prevent Datagridview column sorting

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Hi all,

How do I prevent the user from clicking on the column headers, thereby
preventing the user from sorting the records in the datagridview ?
Is there like a datagridview1.Sort = false :

Thanks
Andrew
 
For each column you can set SortMode to
DataGridViewColumnSortMode.NotSortable

Marc
 
Hi,
Thanks for reply.
Could you give an example on how to use it with some code ?

Thanks
Andrew
 

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

Back
Top