page view state for sort expression datagrid

C

cindy

using the ASP.NET datagrid control to
displaying some data from SQLserver, also provide paging and sorting
function for the datagrid. However, after sorting
a certain bouldcolumn, if change the page index , the new paged data is
not sorted? How do I store a variable in
Page's ViewState to identify the last sort expression and whenever need
to rebind the datagrid, can sort the datasource through the sort
expression stored previously?
 
S

Steven Cheng[MSFT]

Hi Cindy,

Thanks for your posting. As for this problem I've posted my repsonse in
your former thread below:

Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
Subject: Datagrid paging I lose my sort

I'd appreciate if you have a look there. Also,if you feel it convenient, we
can continue to discuss there.

Thank you!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: page view state for sort expression datagrid
| thread-index: AcXki7spv5IZok2RRLG5ePNtt66TKQ==
| X-WBNR-Posting-Host: 71.136.160.120
| From: "=?Utf-8?B?Y2luZHk=?=" <[email protected]>
| Subject: page view state for sort expression datagrid
| Date: Tue, 8 Nov 2005 09:42:04 -0800
| Lines: 10
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:5982
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| using the ASP.NET datagrid control to
| displaying some data from SQLserver, also provide paging and sorting
| function for the datagrid. However, after sorting
| a certain bouldcolumn, if change the page index , the new paged data is
| not sorted? How do I store a variable in
| Page's ViewState to identify the last sort expression and whenever need
| to rebind the datagrid, can sort the datasource through the sort
| expression stored previously?
| --
| cindy
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top