Datagrid scrollbars

Posted on 2006-07-10
Last Modified: 2008-02-26
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?
Question by:Neal Hartman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3

Expert Comment

ID: 17072519
Do you have the datagrid on a panel or other type of container control?

Author Comment

by:Neal Hartman
ID: 17072543
Yes, it's on a Tabcontrol.

Expert Comment

ID: 17072602
Are you disabling the Tabcontrol for any reason?

Accepted Solution

Bill_PSC earned 500 total points
ID: 17072643
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.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question