Sort table without round trip

G

Guest

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
 
G

Guest

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 :

(e-mail address removed)
 
S

Steve Drake

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 said:
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.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top