ok I have RadGrid implemented, it works great and I can see my data
I implemented a checkbox control on that grid
Now I have a button on the page, under its click event I want to read all the rows which are checked
I am doing something similar but its not working.
I am unable to check the checkbox is checked or not.
I implemented a checkbox control on that grid
<telerik:GridTemplateColumn HeaderText="Select" UniqueName="AssetId"> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" /> </ItemTemplate></telerik:GridTemplateColumn>Now I have a button on the page, under its click event I want to read all the rows which are checked
I am doing something similar but its not working.
I am unable to check the checkbox is checked or not.
protected void UpdateButton_Click(object sender, EventArgs e) { for (int i = 0; i < RadGrid1.MasterTableView.Items.Count; i++) { bool isChecked = ((CheckBox)RadGrid1.MasterTableView.FindControl("CheckBox1")).Checked; if (isChecked) { Label lbl = ((Label)RadGrid1.FindControl("lblRadItemId")) as Label; LabelValue = ((Label)RadGrid1.Rows[i].Cells[8].FindControl("lblRadItemId")).Text; }}