winforms - Why programmatic selection of multiple rows from DataGridView do not highlight rows -


i try programatically select multiple rows in datagridview control. in way:

dgvmain[0, 6].selected = true; dgvmain[0, 9].selected = true; 

technically works because

dgvmain.selectedrows; 

returns correct values.

unfortunatelly selected rows not highlighted in gui. problem disappear when

dgvmain.multiselect = false 

i have set selectionmode property fullrowselect. tried method like: invalidate, refresh, refreshedit, without success.

any ideas why not work expected?

i fixed issue. main problem tried select row before displaying control. problem described here: http://psworld.pl/programming/datagridviewbugs


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -