Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question about the Scroll event for a datagrid.

42 views
Skip to first unread message

gemmax

unread,
Jan 8, 2005, 8:55:01 PM1/8/05
to
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

Sergey Bogdanov

unread,
Jan 9, 2005, 2:00:47 PM1/9/05
to
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

0 new messages