C
Calvin KD
I have a simple datagrid with bound columns. My problem is: Everytime I click
the ellipsis (the ...) at the end of the page numbers (custom paging) to go
to the next set of pages, when the next set of pages is displayed :
1. The next sequential page number (first page of the next set) is shown
without the underline, but the grid contents are not the contents of the
indicated page number. The contents apparently belong to the last page of
that new set. But I could not click on the first page because it has no
underline (currently active).
2. When I click on any other page numbers, it somehow takes me back to the
first set of pages.
Following is the sample of my Grid_Changed() event codes activated from the
onpageindexchanged event:
public void dgResults_Changed(object sender, DataGridPageChangedEventArgs e)
{
dgResults.CurrentPageIndex = e.NewPageIndex;
Display_Results();
}
private void Display_Results()
{
...
SqlDataAdapter daCOT = new SqlDataAdapter(sSQL, objDBConn);
daCOT.Fill(dstCOT);
if (dstCOT != null)
{
if (dstCOT.Tables[0].Rows.Count > 0)
{
grResults.PagerStyle.Visible = true;
}
else
{
// No records returned, so hide the Pager row.
grResults.PagerStyle.Visible = false;
}
}
...
}
Any ideas anyone?
Thanks
the ellipsis (the ...) at the end of the page numbers (custom paging) to go
to the next set of pages, when the next set of pages is displayed :
1. The next sequential page number (first page of the next set) is shown
without the underline, but the grid contents are not the contents of the
indicated page number. The contents apparently belong to the last page of
that new set. But I could not click on the first page because it has no
underline (currently active).
2. When I click on any other page numbers, it somehow takes me back to the
first set of pages.
Following is the sample of my Grid_Changed() event codes activated from the
onpageindexchanged event:
public void dgResults_Changed(object sender, DataGridPageChangedEventArgs e)
{
dgResults.CurrentPageIndex = e.NewPageIndex;
Display_Results();
}
private void Display_Results()
{
...
SqlDataAdapter daCOT = new SqlDataAdapter(sSQL, objDBConn);
daCOT.Fill(dstCOT);
if (dstCOT != null)
{
if (dstCOT.Tables[0].Rows.Count > 0)
{
grResults.PagerStyle.Visible = true;
}
else
{
// No records returned, so hide the Pager row.
grResults.PagerStyle.Visible = false;
}
}
...
}
Any ideas anyone?
Thanks