Click here to Skip to main content
15,743,541 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Note it is windows application.

How to disable the column header sorting in DataGridView using csharp.
In which event i write the code.
how can i do? what is the code?

Please help me.
Narasiman P.

private void dataGridView1_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
           e.Column.SortMode = DataGridViewColumnSortMode.NotSortable;
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