page view state for sort expression datagrid

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default page view state for sort expression datagrid

    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
    cindy Guest

  2. Similar Questions and Discussions

    1. View state help
      Do you modify the page at all? Sometimes modifying the page causes the error you described. Alternatively, you do not have to use ViewState in...
    2. Maintaining view state in datagrid
      hi all, I have a datagrid in my asp.net page. In that datagrid, i have paging enabled. And one template column having checkbox control in...
    3. DataGrid does not keep sort when I move to another page
      I'm somewhat a Newbie, so it took me while to figure the ViewState out, but once I did it worked perfectly. "Scott M." <s-mar@nospam.nospam>...
    4. ItemCommand not working when datagrid can page and sort
      Where is Microsoft? Can anyone answer this question? This is a big problem.
    5. The View State Is Invalid for This Page and Might Be Corrupted
      Can anyone provide some help on this issue? Our code works fine on a single machine but in a web farm environment we get the following error. ...
  3. #2

    Default RE: page view state for sort expression datagrid

    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.webcontro ls
    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! [url]www.microsoft.com/security[/url]
    (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=?=" <cmello@nospam.nospam>
    | Subject: page view state for sort expression datagrid
    | Date: Tue, 8 Nov 2005 09:42:04 -0800
    | Lines: 10
    | Message-ID: <4AF25608-D492-4179-8C01-302EB3150552@microsoft.com>
    | 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.datagridc ontrol
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.datagridc ontrol:5982
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridc ontrol
    |
    | 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
    |

    Steven Cheng[MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139