marcinhU
asked on
Panel with DataGridView and a Button scrolling problem
I have a panel with a dataGridView and a Delete Button, with the AutoScroll of the panel set to True,
and i need to make the button change its location to the left side of the row I select on the dataGridView, and im having trouble getting the button to work properly, the thing is that when my datagridView gets too many rows, i can't set the location of my button properly, so the button disappear if i select a row bigger then 15, which is the limit of the panel before the scroll starts to show up...
I tried using a VScrollBar instead of the panel's Autoscroll but still I can't get passed to this problem =(
and i need to make the button change its location to the left side of the row I select on the dataGridView, and im having trouble getting the button to work properly, the thing is that when my datagridView gets too many rows, i can't set the location of my button properly, so the button disappear if i select a row bigger then 15, which is the limit of the panel before the scroll starts to show up...
I tried using a VScrollBar instead of the panel's Autoscroll but still I can't get passed to this problem =(
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found it very easy to obtain the top, just get the rectangle of the cell and just set the top of that rectangle to the top of the button =)
http://www.codeproject.com/KB/miscctrl/CustomAutoScrollPanel.aspx