Disable datagridview sorting

  • Thread starter Matthew Humphrey
  • Start date
M

Matthew Humphrey

I have a DataGridView control, and i would like to disable the ability to
resort data rows by clicking on a colum header. Could someone please help
with this?

Thanks
MATT
 
B

Bruno Alexandre

<asp:GridView AllowSorting="false" ... />

myGridView.allowsorting = false

--

Bruno Alexandre
København, Danmark

"a portuguese in Denmark"
 
C

Capri

There is no such property for datagridview control, that allows sorting for all columns in the grid!!!!
 
I

IvanK

foreach (DataGridViewColumn column in
this.dataGridView.Columns)
{
column.SortMode =
DataGridViewColumnSortMode.NotSortable;
}
 

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,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top