I'm using a RadGrid within a RadTab, within a RadWindow. My local RadGrid attributes are:
My global RadGrid skin attributes are:
And my OnNeedDataSource function simply resets the DataSource of the grid:
I've added 5 items dynamically to the grid, in order each named "First", "Second", "Third", "Forth", "Fifth". I add these items to a list using Members.InsertAt(0, new CustomListItem("First")). The "InsertAt(0,...)" forces the next item added to the list to appear in the first row in the grid when rebound. The issue I'm noticing is when paging, the RadGrid displays the wrong end of the list on the next page. In the screen shot, I would expect to see, in order, "Second" and "First" on page 2 (screenshot fig b.), but instead it displays "Fifth", "Forth"...which is already being displayed when viewing page 1 (screenshot fig a.). I've inspected the data source and all items do exist (screenshot fig c.).
Any ideas on why the range that the RadGrid is selecting to view on the next page is not correctly aligned with the datasource?
Thanks,
Patrick
<
rad:RadGrid
runat
=
"server"
id
=
"memberGrid"
OnNeedDataSource
=
"MemberGridNeedDataSource"
OnItemCreated
=
"MemberGridItemCreated"
OnItemDataBound
=
"MemberGridItemDataBound"
ShowHeader
=
"true"
BorderWidth
=
"0"
>
<
MasterTableView
PageSize
=
"3"
>
<
Columns
>
...
</
Columns
>
</
MasterTableView
>
</
rad:RadGrid
>
<rad:RadGrid
runat=
"server"
ImagesPath=
"~/App_Themes/mySkin/Grid"
Skin=
"mySkin"
EnableEmbeddedSkins=
"false"
AutoGenerateColumns=
"false"
ShowFooter=
"true"
AllowPaging=
"true"
PageSize=
"25"
AllowSorting=
"true"
Width=
"100%"
>
<PagerStyle Mode=
"NextPrevNumericAndAdvanced"
></PagerStyle>
</rad:RadGrid>
And my OnNeedDataSource function simply resets the DataSource of the grid:
protected
void
MemberGridNeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
memberGrid.DataSource = Members; // Generic List
}
I've added 5 items dynamically to the grid, in order each named "First", "Second", "Third", "Forth", "Fifth". I add these items to a list using Members.InsertAt(0, new CustomListItem("First")). The "InsertAt(0,...)" forces the next item added to the list to appear in the first row in the grid when rebound. The issue I'm noticing is when paging, the RadGrid displays the wrong end of the list on the next page. In the screen shot, I would expect to see, in order, "Second" and "First" on page 2 (screenshot fig b.), but instead it displays "Fifth", "Forth"...which is already being displayed when viewing page 1 (screenshot fig a.). I've inspected the data source and all items do exist (screenshot fig c.).
Any ideas on why the range that the RadGrid is selecting to view on the next page is not correctly aligned with the datasource?
Thanks,
Patrick