Solved

Datagrid scrollbars

Posted on 2006-07-10
4
676 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
Comment Utility
Do you have the datagrid on a panel or other type of container control?
0
 
LVL 1

Author Comment

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

Expert Comment

by:Bill_PSC
Comment Utility
Are you disabling the Tabcontrol for any reason?
0
 
LVL 2

Accepted Solution

by:
Bill_PSC earned 500 total points
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

5 Experts available now in Live!

Get 1:1 Help Now