Posted on 2006-11-02
i have a datagrid and in that i have checkbox, everything is working fine except i found one thing that really bothering me.
when i check the checkbox like (1 or 2 or 5) and i click on save button then it gives me the value of whatever i have checked which is great but you will be only able to get the value of a current page not the next page
what i mean by that.
let say page one, i have check 3 checkbox and i go to page two and check 2 more checkbox so total is 5 correct, so when i hit the save button it give me the values for 2 not total 5 ? because it look for the current page only.
so my question is: how do i loop through all the RadGrid pages and get whatever is checked?
i'm using something like this now...
foreach (DataGridItem item in dg.Items)
HtmlInputCheckBox chkBx = (HtmlInputCheckBox)item.FindControl("EmpId");
if (chkBx != null && chkBx.Checked)
Response.Write(chkBx.Value + "<br>");