Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datagrid paging question

Status
Not open for further replies.

vcllvc

Programmer
Jul 12, 2001
136
US
i have a datagrid which allows paging, I am able to click on next page, and rebind the data and show up the next continue rows on next page.
But the problem is the rows are also selectable, when I click a select on a row, the selected row is actually the 1st page's row. Do I need to implement something or how to config the datagrid's property?

Thanks in advance.

Vincent
 
sounds ok, but check that you are not rebinding the grid on your select, or resetting the selectedIndex of the datagrid somewhere else...

Or, you are not properly setting the linking value somewhere...

if you want to post some routines, we can help identify it for you.

 
thanks adamroof.

your post make me think about my code again. It turns out the grid is ok; I was doing something stupid.

I used the selectedIndex and retrieved the data from the underlaying datatable, not the selectedItem.

What a catch!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top