Single sort column in DataGrid!?

B

Brett P.

Hello,
I am trying to have only one column sortable within a
data grid. I know you set the allowsorting property to
true on the style or the grid, but this enables sorting
for all columns. Is there a way to override this
implementation so that only a few or one of the columns
may be sorted?

thanks,
-brett
 
W

William Ryan

Brett:

Is this desktop or Web? You can trap the mouse down event and bind your
grid to a dataView instead of a datatable, You can manipulate the sort from
there. Whether this is desktop or web will have a subtle effect on how to
do this, but if you use a Dataview, sort it, and bind the grid to it, you
can make just about anything happen.

Let me know if you have any troubles.

Bill
 

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