Hi,
I have just started using the Aikido WebDataGrid (Infragistics35.Web.v9.2, Version=9.2.20092.1003) and have been able to successfully display a number of fields bound to an Access data source, and associate one of the columns with a DropDownProvider for editing. This all works fine.
However, I would like to take advantage of the TemplateDataField to add other controls, but have found that I get the following error when I convert one of my fields to a TemplateDataField. Note, this only happens if I include an EditorProvider? If I comment out the EditorProvider, the error disappears? The field I have converted to a TemplateDataFIeld is NOT associated an EditorProvider.
The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
Any help would be most appreciated.
Thanks
Jon
Hello Jon,
Please contact dev support regarding this problem. Thanks.
This is a completely useless answer.
I'm getting the exact same error in the 2010.1 version of WebDataGrid. So, What's the problem here exactly?
So do template fields not work at all in the webdatagrid? I'm using 10.2 and as soon as I add a template to a template field I get an error on postback.
<ig:TemplateDataField Key="Img" Header-Text="Img"> <ItemTemplate> <asp:Label ID="Label1" runat="server">blah</asp:Label> </ItemTemplate> <Header Text="Img" /> </ig:TemplateDataField>
<ig:TemplateDataField Key="Img" Header-Text="Img">
<ItemTemplate>
<asp:Label ID="Label1" runat="server">blah</asp:Label>
</ItemTemplate>
<Header Text="Img" />
</ig:TemplateDataField>
Removing the item template causes the error to go away.
Hello guys,
I would like to inform you that this issue has been fixed and it will be available in next service release. A release schedule you could refer here
Hi Rado,
Does the Service Release on July 29 include this item?
Also, is there any release note of service release for reference?
Does anyone know if this actually got fixed?
We are using 13.1.20131.2107 and have this exact same problem on a WebHierarchicalDataGrid. Removing the <%...%> from the template field doesn't help.
If we have TemplateDataField on its own the grid works fine, if we have DropDownProvider on its own grid works fine.
If we have BOTH, we get this error....
Exception message: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Hah - so after posting this I thought I'd just play around a bit more and see if I could fix it.
Seems that calling databind on the grid's Init event fixes our problem.
protected void WebHierarchicalDataGrid1_Init(object sender, EventArgs e) { WebHierarchicalDataGrid1.DataBind(); }
We were simply binding to SQLDataSources in the markup and seems this is not enough, need to forcibly databind in the codebehind. It's like the grid is doing some events internally in the wrong order or something and forcing the databind fixes it up.
Anyway, this fixes it for us and hopefully for anyone else out there who comes across this problem.
Over and out.