P
PeterB
Hello!
I am trying to force a datagrid not to show the Horizontal Scroll. From what
I have seen it is not possible to do this in an easy manner (i.e. set a
property etc.).
I tried this using Reflection and FieldInfo to set the HScroll.Visible
property to false in the DataGrid paint event.but there are a some unwanted
side-effects.
1. The area behind the HScroll is not updated (How would you reapaint that
area?)
2. The VScroll heigth has to be set to datagrid size each time. (easy)
3. Each Paint event first draws the HScroll and then it is removed with my
code. Not pretty!
Another idea would be to create a custom DataGrid. I could override the
OnPaint event. But even so, base.OnPaint() would draw the HScroll first and
the unwanted flicker would appear. Overriding OnPaint totally (without
calling base) sounds like a major task...
Has anyone been involved in something similar?
/ Peter
I am trying to force a datagrid not to show the Horizontal Scroll. From what
I have seen it is not possible to do this in an easy manner (i.e. set a
property etc.).
I tried this using Reflection and FieldInfo to set the HScroll.Visible
property to false in the DataGrid paint event.but there are a some unwanted
side-effects.
1. The area behind the HScroll is not updated (How would you reapaint that
area?)
2. The VScroll heigth has to be set to datagrid size each time. (easy)
3. Each Paint event first draws the HScroll and then it is removed with my
code. Not pretty!
Another idea would be to create a custom DataGrid. I could override the
OnPaint event. But even so, base.OnPaint() would draw the HScroll first and
the unwanted flicker would appear. Overriding OnPaint totally (without
calling base) sounds like a major task...
Has anyone been involved in something similar?
/ Peter