I have followed the examples posted at
http://www.telerik.com/help/aspnet-ajax/grdselectingrowwithclick_client.html
and also looked at the posting
http://www.telerik.com/community/forums/aspnet-ajax/grid/server-side-selecting-row-on-other-grid-page.aspx
When I submit the selected grid items, I am unable to obtain the selected values from other pages on the grid.
I have tried the following code:
int count = RadGrid1.MasterTableView.PageCount;
for (int i = 0; i < count; i++)
{
RadGrid1.CurrentPageIndex = i;
RadGrid1.Rebind(); <--- The rebinding appears to remove all selected items.
foreach (GridDataItem item in RadGrid1.Items)
{
if (item.Selected)
{
HiddenField hdn = (HiddenField)item.FindControl("hdnFieldID");
int AID = int.Parse(hdn.Value);
// Perform action
}
}
}
If I loop through the grid it just obtains the values of the current page.
foreach (GridDataItem item in RadGrid1.Items)
{
if (item.Selected)
{
HiddenField hdn = (HiddenField)item.FindControl("hdnFieldID");
int AID = int.Parse(hdn.Value);
// Perform action
}
}
How can you obtain all selected values on the RadGrid when selected rows exist on other pages?
http://www.telerik.com/help/aspnet-ajax/grdselectingrowwithclick_client.html
and also looked at the posting
http://www.telerik.com/community/forums/aspnet-ajax/grid/server-side-selecting-row-on-other-grid-page.aspx
When I submit the selected grid items, I am unable to obtain the selected values from other pages on the grid.
I have tried the following code:
int count = RadGrid1.MasterTableView.PageCount;
for (int i = 0; i < count; i++)
{
RadGrid1.CurrentPageIndex = i;
RadGrid1.Rebind(); <--- The rebinding appears to remove all selected items.
foreach (GridDataItem item in RadGrid1.Items)
{
if (item.Selected)
{
HiddenField hdn = (HiddenField)item.FindControl("hdnFieldID");
int AID = int.Parse(hdn.Value);
// Perform action
}
}
}
If I loop through the grid it just obtains the values of the current page.
foreach (GridDataItem item in RadGrid1.Items)
{
if (item.Selected)
{
HiddenField hdn = (HiddenField)item.FindControl("hdnFieldID");
int AID = int.Parse(hdn.Value);
// Perform action
}
}
How can you obtain all selected values on the RadGrid when selected rows exist on other pages?