Link to home
Start Free TrialLog in
Avatar of astaga
astaga

asked on

how can i force the scrollbars on the datagrid to be always visible..

how can i force the scrollbars on the datagrid to be always visible.. i tried to do many things, but it always seems to hide after loading in the entire data from the datasource.

i tried this code, and also tried to use reflection, but none seems to work.

foreach(Control c in this.Controls)
{
   Type aType = c.GetType();
   if(aType == typeof(System.Windows.Forms.HScrollBar))
            ((System.Windows.Forms.HScrollBar)c).Visible = true;
   else if(aType == typeof(System.Windows.Forms.VScrollBar))
            ((System.Windows.Forms.VScrollBar)c).Visible = true;
}

thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of heboh
heboh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial