c# - Best way to disable the column header sorting in DataGridView -


this question has answer here:

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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -