c# - How to: Single Selection with Multiple DataGridViews -
i pulling records sql database via linq , displaying entries in 2 separate datagridviews. i'm wondering best way allow 1 row selected between 2 components?
for example: if a, b, , c stored in dgv1. , d, e, , f stored in dgv2. a, b, c, d, e, or f can selected @ time.
what i've tried far: using selectionchanged event each dgv call clearselection() in other dgv. horrible idea since infinite loop. tried playing around cellclick event not account users changing selection via up/down keys.
any appreciated , please let me know if info needed.
don't call clearselection()
other grid in selectionchanged
event if nothing selected. i.e. if (changedgrid.selectedrows.count > 0) {othergrid.clearselection();}
Comments
Post a Comment