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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now