Datagrid scrollbars

I seem to be missing something. I create as dataset, then the dataview and set the datagrid to the dataview. Why are the scrollbars grayed out and useless?
LVL 1
Neal HartmanAsked:
Who is Participating?
 
Bill_PSCCommented:
I found an answer for you;

Right after binding the data to the datagrid re-enable the scrollbar. If you have a large datatable you'll find that both vertical and horizontal scrollbars are visible but disabled. Do this in the following manner:

datagrid.Controls[0].Enabled = true; // Index zero is the horizontal scrollbar
datagrid.Controls[1].Enabled = true; // Index one is the vertical scrollbar

...but make sure you do the above *after* applying any RowFilter criteria to the underlying DataView you are binding to, ...

...or the Scrollbars get disabled again.


http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=55293&SiteID=1
0
 
Bill_PSCCommented:
Do you have the datagrid on a panel or other type of container control?
0
 
Neal HartmanAuthor Commented:
Yes, it's on a Tabcontrol.
0
 
Bill_PSCCommented:
Are you disabling the Tabcontrol for any reason?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.