I have a radgrid on my page that I build programmatically within my Page_Init. I use the NeedDataSource to populate my grid. I have pagination enabled along with filtering.
When the user is on my screen the radgrid displays with information that spans multple pages. They can also use filtering to shrink the number of pages down. They will then have the ability to click on a regular asp button. This button will then try to gather all of the ids from all of the records in the radgrid. Not just the records on the current page.
An example:
1. the radgrid has a pagination set to 100 records. the datasource has a total of 1600 records in it. So I have a radgrid of 16 pages, 100 at a time.
2. the user uses a filter to shrink the number of pages down to 9 with a total of 850 records showing. the datasource still has 1600 because the radgrid is filtering and not the actual datasource.
3. the user clicks the button. I want, on the server, to be able to traverse through all 850 records to get their specific datakeyitem and do something like this but the problem is the MasterTableView only has 100 records in it not the 850.
protected void Button1_Click(object sender, EventArgs e) { foreach (GridDataItem item in RadGrid1.MasterTableView.Items) { int detailID = dataItem.GetDataKeyValue("DetailID"); //do something with the detailID } }What else can I do to get this? I could try to store the ids that come back during the loading of the radgrid, but to do this I think I would need to take pagination off, rebind, get the ids, put pagination back on, rebind. I don't see something like this as an option because my datasource could have high number of records and binding twice would lead to user's waiting.
Thanks