Programatically Selecting DatagridView Row

0
0

Hi,

Although searching and selecting a datagridview row programatically based on a  condition works and highlights the selected row, datagridview doesn’t scroll  up or down if the selected/highlighted row is not visible within the full datagriview window requiring the user to manually scroll down or up to search/look for the selected/highlighted row.

Using pseudocode

for each row in datagridview row

if row condition is true

row.Selected = true

WinForms and VWG scroll down/up to make the selected/highlighted row visible.

Thanks.

Puloy

  • You must to post comments
0
0

Selected and highlighted (current, focused) are different things. You can select row 1 and row 1000 at the same time which cannot possibly both be in view. The current (highlighted, focused) row/cell is always scrolled into view.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.