开发者

Find out if DatagridView Cell is Clicked

开发者 https://www.devze.com 2023-01-17 18:22 出处:网络
I have 2 grids on a form. Both grids are binded to object Panel and PanelLines. If user click first panel grid, the second panel line grid will show the related panel lines.

I have 2 grids on a form.

Both grids are binded to object Panel and PanelLines.

If user click first panel grid, the second panel line grid will show the related panel lines.

If the user clicks the panel grid on the same cell again, I want panel line grid to scroll rows as such visible r开发者_如何学Goows hide and bottom rows show up.

The following code does the scrolling part.

dgvPanelItem.FirstDisplayedScrollingRowIndex = dgvPanelItem.DisplayedRowCount(False) - 1

But I need help in finding out, if first grid ( panel grid ) is already clicked or not.


Put a static variable flag, this should solve the specified problem

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号