I am using RADGrid probably a little differnt than the typical - edit one item, update, save, repeat. I am using the RadGrid mainly because of its ability to maintain state on postback from the server.
I am having trouble looping through the grid from a OnCheckChange function/process.
So I have a Parent / Child Grid setup. I do have more values assigned, but for simplicity I provided the sample above. What I am doing is when the check box within the Parent or Child grid is selected I am running a routine - but I am having trouble looping through the vaules. Below is what I am attempting. Can someone assist with where I am missing?
I am having trouble looping through the grid from a OnCheckChange function/process.
So I have a Parent / Child Grid setup. I do have more values assigned, but for simplicity I provided the sample above. What I am doing is when the check box within the Parent or Child grid is selected I am running a routine - but I am having trouble looping through the vaules. Below is what I am attempting. Can someone assist with where I am missing?
Public Sub CheckBoxParent(ByVal sender As System.Object, ByVal e As System.EventArgs)For Each item As GridDataItem In rParent.Items Dim myCheckbox As CheckBox = DirectCast(item.FindControl("CheckBoxParent"), CheckBox) Dim hAttributeID As HiddenField = DirectCast(dataItem.FindControl("hAttributeID"), HiddenField) ' Child radGrid Dim dg As Telerik.Web.UI.RadGrid = item.FindControl("radChild") ' trying to Loop through each DataGridItem of the child grid For Each dgItem As GridDataItem In dg.Items NextNextEnd Sub<telerik:RadGrid id="rParent" runat="server" AllowMultiRowSelection="True"> <MasterTableView ShowHeader="true" AutoGenerateColumns="false"><Columns><telerik:GridTemplateColumn><HeaderTemplate></HeaderTemplate> <ItemTemplate> <asp:CheckBox id="CheckBoxParent" OnCheckedChanged="findScore"AutoPostBack="True" runat="server"></asp:CheckBox> <%# DataBinder.Eval(Container.DataItem, "KeyID") %><asp:HiddenField ID="hAttributeID" runat="Server" Value='<%# DataBinder.Eval(Container.DataItem, "AttributeID") %>' /> <telerik:RadGrid id="rChild" runat="server"> <MasterTableView ShowHeader="false" AutoGenerateColumns="false"> <Columns> <telerik:GridTemplateColumn> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "Description") %> <%# DataBinder.Eval(Container.DataItem, "AttributeID") %> <asp:CheckBox id="CheckBoxChild" OnCheckedChanged="findScore"AutoPostBack="True" runat="server"></asp:CheckBox> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> <ClientSettings EnableRowHoverStyle="false" EnablePostBackOnRowClick="true" /> </telerik:RadGrid></ItemTemplate></telerik:GridTemplateColumn></Columns></MasterTableView></telerik:RadGrid>