c# - Best way to disable the column header sorting in DataGridView -
this question has answer here:
- how disable sort in datagridview? 7 answers
i need disable column header sorting in datagridview
.
we can setting property of individual columns like
balancesgridview.columns[1].sortmode = datagridviewcolumnsortmode.notsortable;
if case , i'll have loop through columns.
is there better way ?
no, think setting sortmode on column directly gets. honestly, cares? what's bad simple loop?
Comments
Post a Comment