The Datagrid in the Compact Framework has fixed 13 pixel wide/tall scrollbars but no way to resize them. Creating a control that inherits from Datagrid, overriding the size of the scrollbars would be one way to go, but it can be achieved without the need to do this by using reflection.
FieldInfo fieldInfo = dgBinDetail.GetType().GetField("m_sbVert", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance); ((VScrollBar)fieldInfo.GetValue(dgBinDetail)).Width = 30;
Remember to add the System.Reflection namespace to your list of using statements at the top of your class.
Advertisements