Click here to Skip to main content
15,913,333 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,


Can any one tell me how to disable sorting in DataGridView.

I already saw one option 'Notsortable' but it is column wise.

So we need to write a loop for that to disable sorting for all columns.

Is there any option to disable at grid level?






Regards,

Ragamaie
Posted
Comments
Herman<T>.Instance 16-Sep-11 10:29am    
a small google search all lead to do a foreach iteration over the column collection and disable per column.

1 solution

Hide the header & Add a new custom header by setting the properties like


DataGridViewHeaderBorderStyle.None &
DataGridViewHeaderBorderStyle.Raised
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900