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
Solved

Datagrid scrollbars

Posted on 2006-07-10
4
680 Views
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?
0
Comment
Question by:Neal Hartman
  • 3
4 Comments
 
LVL 2

Expert Comment

by:Bill_PSC
ID: 17072519
Do you have the datagrid on a panel or other type of container control?
0
 
LVL 1

Author Comment

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

Expert Comment

by:Bill_PSC
ID: 17072602
Are you disabling the Tabcontrol for any reason?
0
 
LVL 2

Accepted Solution

by:
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.


http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=55293&SiteID=1
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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