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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort datagrid with out refreshing the data

Status
Not open for further replies.

ralphtrent

Programmer
Joined
Jun 2, 2003
Messages
958
Location
US
Hi
I have a question. Can I sort the data in a datagrid with out having to go out to the database again. Also, I want to add paging. When I do the paging and sort a column the whole data set gets refreshed and my sorting is lost.

So what I would like happen is this
1. not have to go out to the database each time I sort a column.

2. when I sort the column, leave the sort even when i move pages.

I think that i am asking for is not to complicated but i can not figure it out.


Thanks
 
look into DataViews...they can be sorted and searched i believe
 
i have the sorting working, its just when i page the sorting is gone, I think it is because I keep refreshing my dataview when i go to the next page. Is there a way around that?

Thanks
 
you need to set your sorting value as a session variable...then everytime you refresh you dataview it will either remember what the session("sort") was or set the session("sort")...does that sound right?
 
i see what you are saying, Checkai..

Thanks
 
Have you gotten this to work correctly.?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top