Displaying sort order

G

Guest

Is there a way to indicate on a datagrid which column the datagrid has been
sorted by?

By default, my customer list is sorted in customer name order, but if they
sort by state, I'd like to indicate it on that column.

SC
 
C

Cowboy \(Gregory A. Beamer\)

There is no built-in way. I would consider looking at Esposito's work on
MSDN, as he has an example where he has extended a DataGrid control to do
some extra "stuff". You can extend to set the header differently on a column
that is being sorted on. I am sure you can kludge this functionality in, but
I would not advise that direction.

CSS may be another option for this functionality, but I still see extending
the DataGrid control is the best option for reuse.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
G

Guest

You have to modify the header text of the column in the datagrid at runtime. You can either append a arrow image to it or number 5 and 6 in webdings font

The following link has examples and information about sorting in the datagrid
http://www.msdn.microsoft.com/msdnmag/issues/01/10/cutting/default.asp

Suresh

----- (e-mail address removed) wrote: ----

Is there a way to indicate on a datagrid which column the datagrid has bee
sorted by

By default, my customer list is sorted in customer name order, but if the
sort by state, I'd like to indicate it on that column

S
 

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

Top