Sort table without round trip

Discussion in 'ASP .Net' started by =?Utf-8?B?WWFuaXI=?=, Apr 6, 2004.

  1. H
    I have to display a sortable list of columns(a table or so) - by click on the title of a column, the column would be the criteria to sort by
    I know datagrid is very conveniant, but I want to save the round trip to the server(I don't want postback)
    Is there other way to use ASP.NET server controls(maybe the datagrid itself) to have an easy databound from one hand and client sort from second
    May be a technique that tranform a XSL on a datagrid result in the client

    For now all I could think of, is call to response.write, that send string of XML to the client, like with traditinal asp, and transorm a different xsl via the client DOM,(xsl files that changed according to the sort field)

    I would be glad to here better suggestion to save the round trip
    If there aren't , I would be glad to be noted on a good article that explains how to implement the XML/XSL technique
    thank
    =?Utf-8?B?WWFuaXI=?=, Apr 6, 2004
    #1
    1. Advertising

  2. You can cut out the "database requery" bit of the round trip by persisting the dataset with your records to a Session variable. Use a DataView on the correct Table in your DataSet and you can sort/filter away... Bind the DataView to your DataGrid rather than direct to the Table..

    use

    If Not IsPostback The
    'query D
    Els
    'just reset your dataview on the dataset's tabl
    'rebind your grid..
    End I

    OK, still a round trip but no database requery required... :

    Not sure how you could affect the DataGrid WITHOUT a trip back to the server to run ASP.NET to reset the grid's properties as it IS a server-sid control... Would be interested to know any techniques you uncover :

    =?Utf-8?B?YWxhc3Bpbg==?=, Apr 6, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?WWFuaXI=?=

    Steve Drake Guest

    When you say without round trip, do you mean no post back?

    This can been done with an XML island, you can create XSLT from the island
    and change the XML on the island (eg sort it) and you XSLT will change your
    table.

    try a google with XML ISLAND SORT as your search.

    but I dont think ASP.NET has any controls out of the box that do this.

    Steve

    "Yanir" <> wrote in message
    news:...
    > Hi
    > I have to display a sortable list of columns(a table or so) - by click on

    the title of a column, the column would be the criteria to sort by.
    > I know datagrid is very conveniant, but I want to save the round trip to

    the server(I don't want postback).
    > Is there other way to use ASP.NET server controls(maybe the datagrid

    itself) to have an easy databound from one hand and client sort from
    second?
    > May be a technique that tranform a XSL on a datagrid result in the client?
    >
    > For now all I could think of, is call to response.write, that send string

    of XML to the client, like with traditinal asp, and transorm a different xsl
    via the client DOM,(xsl files that changed according to the sort field)?
    >
    > I would be glad to here better suggestion to save the round trip?
    > If there aren't , I would be glad to be noted on a good article that

    explains how to implement the XML/XSL technique.
    > thanks
    >
    >
    Steve Drake, Apr 6, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Row
    Replies:
    1
    Views:
    688
    vMike
    Nov 26, 2003
  2. Rathtap
    Replies:
    2
    Views:
    502
    Janaka
    Aug 24, 2004
  3. Replies:
    8
    Views:
    444
    =?Utf-8?B?TWF0SGVydGVs?=
    Oct 8, 2005
  4. =?Utf-8?B?TGFycnk=?=

    Disable web page controls during postback round-trip

    =?Utf-8?B?TGFycnk=?=, Mar 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    6,192
    Adrian Parker
    Mar 9, 2006
  5. Frank Einstein
    Replies:
    4
    Views:
    402
Loading...

Share This Page