Question about the Scroll event for a datagrid.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Since the compact framework doesn't support the scroll event for a datagrid.
I would like to know if there is any workaround to capture the scroll event
for a datagrid.

Thanks
Chuck
 
Actually workaround exists, you can use reflection to retrieve Vertical
ScrollBar & Horizontal ScrollBar private properties but there are no
guarantees that it can't be changed:

VScrollBar vb = (VScrollBar)grid.GetType().GetField("m_sbVert",
BindingFlags.NonPublic|BindingFlags.GetField|BindingFlags.Instance).GetValue(grid);
HScrollBar hb = (HScrollBar)grid.GetType().GetField("m_sbHorz",
BindingFlags.NonPublic|BindingFlags.GetField|BindingFlags.Instance).GetValue(grid);


Best regards,
Sergey Bogdanov
 
Back
Top