Sorting only certain columns in datagrid

C

Cathryn Johns

Hi

I'm binding a dataset to my datagrid at runtime, and I want to allow
sorting only on certain columns. How do I do this? If I set
AllowSorting to true, all the column headers are underlined and
sortable; if I set it to false, none of them are, even if I set the
SortExpression property for the columns that I want to be sortable.

I'm sure it can be done, and it's probably easier to do it at design
time, but as I say I'm only binding the grid to the datasource at
runtime.
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top