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
Hi Thanks for the follow up.
I will update you soon about this. Apology for the late response.
Thanks.
hellooooo Infragistics. its been almost 2 months! i also put in a support ticket and they closed since they saw this thread and since it was reported to the Dev Team. but in the latest version of the controls still not working.
looks like its deeper than that. i modifed my gird and removed the <%...%> and did the initializerow instead and and its still happening.
below is my grid and server side code
<ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid1" runat="server"
Width="1150px" DataSourceID="WebHierarchicalDataSource1" StyleSetName ="LucidDream"
AutoGenerateBands="False" AutoGenerateColumns="False"
DataMember="Incompletes" Key="Incompletes" DataKeyFields="PartID"
ItemCssClass="CellStyle" >
<GroupingSettings EnableColumnGrouping="True" GroupAreaVisibility="Visible">
<RemoveButton AltText="Ungroup Column"></RemoveButton>
</GroupingSettings>
<Columns>
<ig:TemplateDataField Key="OrderID" Width="50px" Header-Text="Order ID" CssClass="w50" >
<ItemTemplate>
<asp:Label ID="Label2" runat="server" ></asp:Label>
</ItemTemplate>
<Header Text="Order ID"></Header>
</ig:TemplateDataField>
<ig:BoundDataField DataFieldName="OrderID" Key="OrderID2" Width="35px" Hidden="true" CssClass="w35" >
<Header Text="Order ID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="DateOrdered" Key="DateOrdered" Width="60px" CssClass="w60">
<Header Text="Date Ordered" />
<ig:BoundDataField DataFieldName="Company" Key="Company" Width="60px" CssClass="w60" >
<Header Text="Company" />
<ig:BoundDataField DataFieldName="PartDescription" Key="PartDescription" Width="145px" CssClass="w145" >
<Header Text="Part" />
<ig:BoundDataField DataFieldName="ComingBack" Key="ComingBack" Width="60px" CssClass="w60" >
<Header Text="Coming BK" />
<ig:BoundDataField DataFieldName="Value" Key="Value" DataFormatString="{0:c}" Width="50px" CssClass="w50" >
<Header Text="Value" />
<ig:BoundDataField DataFieldName="Servicer" Key="Servicer" Width="145px" CssClass="w145">
<Header Text="Servicer" />
<ig:BoundDataField DataFieldName="State" Key="State" Width="30px" CssClass="w30">
<Header Text="State" />
<ig:BoundDataField DataFieldName="FUDate" Key="FUDate" Width="70px" CssClass="w70">
<Header Text="Follow Up Date" />
<ig:BoundDataField DataFieldName="FUStatus" Key="FUStatus" Width="100px" CssClass="w100">
<Header Text="Follow Up Status" />
<ig:BoundDataField DataFieldName="Reminder" Key="Reminder" Width="70px" CssClass="w70">
<Header Text="Notes" />
<ig:BoundDataField DataFieldName="PartID" Key="PartID" Hidden="true" Width="0px" CssClass="w0">
<Header Text="PartID" />
<ig:BoundDataField DataFieldName="CustomerNo" Key="CustomerNo" Hidden="true" Width="0px" CssClass="w0">
<Header Text="CustomerNo" />
</Columns>
<CollapseButton AltText="Collapse Row"></CollapseButton>
<ClientEvents Initialize="initGrid" />
<ExpandButton AltText="Expand Row"></ExpandButton>
<Behaviors>
<ig:Activation>
</ig:Activation>
<ig:EditingCore>
<ig:CellEditing>
<EditModeActions MouseClick="Single" />
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey ="FUDate" EditorID ="DatePickerProvider1" />
<ig:EditingColumnSetting ColumnKey ="FUStatus" EditorID ="DropDownProvider1" />
</ColumnSettings>
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
<ig:Selection RowSelectType="Single">
</ig:Selection>
<ig:Sorting>
</ig:Sorting>
<EditorProviders>
<ig:DatePickerProvider ID="DatePickerProvider1">
</ig:DatePickerProvider>
<ig:DropDownProvider ID="DropDownProvider1">
<EditorControl ID="EditorControl1" DataSourceID="dsFUStatus" DropDownContainerMaxHeight="200px"
EnableAnimations="False" EnableDropDownAsChild="False" TextField="FUStatus"
ValueField="FUStatus" runat="server" Width="200px">
<Button AltText="" />
<DropDownItemBinding TextField="FUStatus" ValueField="FUStatus" />
</EditorControl>
</ig:DropDownProvider>
</EditorProviders>
</ig:WebHierarchicalDataGrid>
Private Sub WebHierarchicalDataGrid1_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Web.UI.GridControls.RowEventArgs) Handles WebHierarchicalDataGrid1.InitializeRow
If e.Row.Items(13).Text.ToString = "10000" Then
e.Row.CssClass = "redForeground"
End If
CType(e.Row.Items(0).FindControl("Label2"), Label).Text = e.Row.Items(1).Text.ToString
CType(e.Row.Items(0).FindControl("Label2"), Label).Attributes.Add("onclick", "OrderInfo('" & e.Row.Items(1).Text.ToString & "');")
End Sub
Hello All,
I've checked this with our Development team and as I promised you , I'm back with more information about this. It appears to be a .NET Framework limitation : "NET framework prevents from adding any controls dynamically to the Form when ASP code blocks are used". This is the case with editor providers they are created dynamically and added to the form.
As a workaround that can be used in this case is not to have <% ...%> (code block) in templates instead assign values into Label control on InitializeRow event handler in code - behind.
Hope this helps you guys.
Hello Guys,
We apologize for the inconvenience .
I would like to ensure you that I've logged this issue with our dev team a few days ago and now we are working on resolve it. now i will increase its priority and soon as I have information in which service release this will be addressed I will drop a line here.
Thank you !