Help sorting list in datagrid.

T

tonicvodka

Hi all!


I've constructed a datagrid with one template column, this so I can
format the data as I please. But it retrieves data from several
database columns.


I want to be able to sort on each of these several database columns, so

on the template column header I have several linkbuttons, wanting each
to pass a different SortExpression.


I tried setting sortexpression in the link buttons like:


<asp:LinkButton id="lnkDate" CommandName="sort" SortExpression="Date"
runat="server">Date</asp:LinkButton>


But as expected, SortExpression isn't passed along.


Is there a way to do this with the built in SortCommand?


Thanks for any suggestions,
Niclas
 

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,772
Messages
2,569,593
Members
45,105
Latest member
sheetaldubay7750ync
Top