D
DaMan
I have code that builds a dataset and connects it to a datagrid. I set up
paging but something is broke.
I can do a pagecount property and it returns 6
I tried to use the simple paging example in MSDN and it only will display
the first page, if I hit the next page button it (the datagrid is not
displayed.)
I can do it manually but only once.
label.text = DataGrid1.PageCount <<returns 6
DataAdapter.Fill(tmpDataSet)
DataGrid1.CurrentPageIndex = 0
DataGrid1.DataBind()
*********Great, displays 1 page****
I can set pageindex to 1 or 2 or 3 or ...6 and get the correct data for that
page....
BUT, I can only do this once, if I display, say, page one or whatever, and
change the pageindex to another page, the datagrid disappears.. I must be
missing something, but I cant figure out what....
Ex Code in PAGE_LOAD
label.text = DataGrid1.PageCount <<returns 6
DataAdapter.Fill(tmpDataSet)
DataGrid1.CurrentPageIndex = 0 << I can set to any nbr up to 5 and get
that page..
DataGrid1.DataBind()
and create a button that simply changes page index
DataGrid1.CurrentPageIndex = 2 << no number works here now after page loads
DataGrid1.DataBind()
********nothing is displayed when I hit button
Please Help Thanks KT
paging but something is broke.
I can do a pagecount property and it returns 6
I tried to use the simple paging example in MSDN and it only will display
the first page, if I hit the next page button it (the datagrid is not
displayed.)
I can do it manually but only once.
label.text = DataGrid1.PageCount <<returns 6
DataAdapter.Fill(tmpDataSet)
DataGrid1.CurrentPageIndex = 0
DataGrid1.DataBind()
*********Great, displays 1 page****
I can set pageindex to 1 or 2 or 3 or ...6 and get the correct data for that
page....
BUT, I can only do this once, if I display, say, page one or whatever, and
change the pageindex to another page, the datagrid disappears.. I must be
missing something, but I cant figure out what....
Ex Code in PAGE_LOAD
label.text = DataGrid1.PageCount <<returns 6
DataAdapter.Fill(tmpDataSet)
DataGrid1.CurrentPageIndex = 0 << I can set to any nbr up to 5 and get
that page..
DataGrid1.DataBind()
and create a button that simply changes page index
DataGrid1.CurrentPageIndex = 2 << no number works here now after page loads
DataGrid1.DataBind()
********nothing is displayed when I hit button
Please Help Thanks KT