I have been using the MasterTableView to page through all pages to get all row/column data in each cell.
It looks to me that when you are paged to page 2 of 2 the first page shows the records for the page 2 on the first page. That is page one now has the data from page two and page two has the data from page one.
Example: I have a grid with 10 record in page one and 1 record on page 2. Paging is set for 10 record per page.
When I cycle through the pages in order of page 1 thenn page 2 the one record from page 2 is printed and then the 10 records from page 1 are printed.
So If I take a snap shot of the records while on page 1 of 2 then take another snap shot when I'm on page 2 of 2 the snap shots are different.
Q1] Please explain how your paging works internally so I can pull the data consistantly no matter how the paging is shown in the grid.
Q2] If you have more then 2 pages in grid then how does the data look for say 3 or 4 pages and page 3 is shown??
Snap Shot format of data is control name, comma, data.
With grid data I added the _PgXRowXColX to the end of the control...
Data (Snap shot one):
ctl00_caseNumberTextBox_textControlRadTextBox:,
ctl00_DefaultContent_caseNumberYearTextBox_numericControlTextBox:2008,
ctl00_DefaultContent_caseNumberCaseTypeTextBox_specialTextControlTextBox:DR,
ctl00_DefaultContent_caseNumberCountyCodeTextBox_numericControlTextBox:24,
ctl00_DefaultContent_caseNumberSeqNoTextBox_numericControlTextBox:00700,
ctl00_DefaultContent_eventDropDownList_requiredDropDownList:Checked In-358,
ctl00_DefaultContent_destinationDropDownList_dropDownListControl:---,
ctl00_DefaultContent_accessTextBox_specialTextControlTextBox:Public,
ctl00_DefaultContent_signatureCheckBox:False,
ctl00_DefaultContent_signOutTextbox_requiredTextControlTextBox:,
ctl00_DefaultContent_commentsTextBox_multilineTextControlTextBox:,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col2:8/22/2008 2:34:17 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col3:Padmakar,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col4:2323,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col5:Public Viewing,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col6: ,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row2Col1:Checked Out,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row2Col2:8/22/2008 1:32:49 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row2Col3:jerry,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row2Col4:Fred Flintstone,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row2Col5:Public Viewing,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row2Col6:Fred was here.,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row3Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row3Col2:7/30/2008 4:36:30 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row3Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row3Col4:fasdfsa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row3Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row3Col6:fasdfasfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row4Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row4Col2:7/30/2008 4:36:20 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row4Col3:jerry,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row4Col4:fasdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row4Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row4Col6:asdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row5Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row5Col2:7/30/2008 4:35:00 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row5Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row5Col4:fadsfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row5Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row5Col6:afdsfasfdas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row6Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row6Col2:7/30/2008 4:34:50 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row6Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row6Col4:fasdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row6Col5:Judge's Chambers,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row6Col6:asdfas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row7Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row7Col2:7/30/2008 4:34:37 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row7Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row7Col4:fasdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row7Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row7Col6:asdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row8Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row8Col2:7/23/2008 9:25:18 AM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row8Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row8Col4:fadsfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row8Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row8Col6:asdfasdfasf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row9Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row9Col2:7/22/2008 6:36:04 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row9Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row9Col4:afsdsfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row9Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row9Col6:afsdasdfas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row10Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row10Col2:7/22/2008 6:35:52 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row10Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row10Col4:fasdfas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row10Col5:Public Viewing,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row10Col6:afsdfaf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col2:7/22/2008 6:30:54 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col4:fadssaf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col6:asdfasfas,
Data (Snap shot two):
ctl00_caseNumberTextBox_textControlRadTextBox:,
ctl00_DefaultContent_caseNumberYearTextBox_numericControlTextBox:2008,
ctl00_DefaultContent_caseNumberCaseTypeTextBox_specialTextControlTextBox:DR,
ctl00_DefaultContent_caseNumberCountyCodeTextBox_numericControlTextBox:24,
ctl00_DefaultContent_caseNumberSeqNoTextBox_numericControlTextBox:00700,
ctl00_DefaultContent_eventDropDownList_requiredDropDownList:Checked In-358,
ctl00_DefaultContent_destinationDropDownList_dropDownListControl:---,
ctl00_DefaultContent_accessTextBox_specialTextControlTextBox:Public,
ctl00_DefaultContent_signatureCheckBox:False,
ctl00_DefaultContent_signOutTextbox_requiredTextControlTextBox:,
ctl00_DefaultContent_commentsTextBox_multilineTextControlTextBox:,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col2:7/22/2008 6:30:54 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col4:fadssaf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg1Row1Col6:asdfasfas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col1:Checked Out,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col2:8/22/2008 1:32:49 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col3:jerry,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col4:Fred Flintstone,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col5:Public Viewing,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row1Col6:Fred was here.,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row2Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row2Col2:7/30/2008 4:36:30 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row2Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row2Col4:fasdfsa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row2Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row2Col6:fasdfasfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row3Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row3Col2:7/30/2008 4:36:20 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row3Col3:jerry,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row3Col4:fasdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row3Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row3Col6:asdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row4Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row4Col2:7/30/2008 4:35:00 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row4Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row4Col4:fadsfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row4Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row4Col6:afdsfasfdas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row5Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row5Col2:7/30/2008 4:34:50 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row5Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row5Col4:fasdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row5Col5:Judge's Chambers,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row5Col6:asdfas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row6Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row6Col2:7/30/2008 4:34:37 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row6Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row6Col4:fasdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row6Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row6Col6:asdf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row7Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row7Col2:7/23/2008 9:25:18 AM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row7Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row7Col4:fadsfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row7Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row7Col6:asdfasdfasf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row8Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row8Col2:7/22/2008 6:36:04 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row8Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row8Col4:afsdsfa,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row8Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row8Col6:afsdasdfas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row9Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row9Col2:7/22/2008 6:35:52 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row9Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row9Col4:fasdfas,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row9Col5:Public Viewing,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row9Col6:afsdfaf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row10Col1:Checked In,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row10Col2:7/22/2008 6:30:54 PM,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row10Col3:rkunisetty,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row10Col4:fadssaf,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row10Col5:Courtroom,
ctl00_DefaultContent_checkOutHistoryGridView_Pg2Row10Col6:asdfasfas,
Code Sample:
case "RADGRIDVIEW":
{
RadGridView rgv = (RadGridView)childControl;
int currentPageIndex = rgv.CurrentPageIndex;
for (int page = 0; page <= Math.Min(rgv.MasterTableView.PageCount - 1, rgv.CurrentPageIndex); page++)
{
int row = 1;
foreach (GridDataItem dataItem in rgv.MasterTableView.Items)
{
int col = 1;
foreach (GridColumn column in rgv.MasterTableView.RenderColumns)
{
if (column is GridBoundColumn)
{
controlValues.Append(rgv.ClientID);
controlValues.Append(
"_Pg" + (page + 1) + "Row" + row + "Col" + col);
controlValues.Append(
":");
controlValues.Append(dataItem[column.UniqueName].Text);
controlValues.Append(
",");
col++;
}
}
row++;
}
//this will fire Page command and move to the next page
rgv.MasterTableView.GetItems(
GridItemType.Header)[0].FireCommandEvent("Page", "Next");
}
rgv.CurrentPageIndex = currentPageIndex;
// reset to the current page
rgv.Rebind();
break;
}//End of case.
End of code.
Q3] Can you show how to FireCommandEvent() event for a specific page like page 3?...
I tried to use the integer value casted to a string...
rgv.MasterTableView.GetItems(GridItemType.Header)[0].FireCommandEvent("Page", myInt.ToString());
Please answer all three questions.
Thanks! JerryM