Disable function in Datagridview

Asked

Viewed 20 times

0

I’m trying to disable the user option click on the Row header so that it doesn’t change the order of the data in the table but I’m not getting...

By clicking the header of each column it rearranges the data and there is an arrow in the right corner (as can be seen in the print in the first column)... as could be done to disable this option?

inserir a descrição da imagem aqui

1 answer

1


foreach (DataGridViewColumn column in dataGridView.Columns)
{
    column.SortMode = DataGridViewColumnSortMode.NotSortable;
}
  • Thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.