Scrollbar keeps showing as disabled after datagrid is enabled

J

Juan

After enabling a datagrid control the scrollbar stays disabled even when i
have more rows that those being displayed. It only starts working when i
sort the datagrid with any displayed column...

thanks in advance,
Juan.
 
G

Guest

Juan, I have a similar problem with my datagrid controls when I clear then
refill the dataset each is bound to. I have had to use a work around for each
dataset fill.

First I saved te value for grid.Size, then set the size to be 1 pixel wider,
then reset to the saved size again. This caused a momentary flicker
(unacceptable to me), but it brought the scroll bar back.

I found two other methods that were more acceptable, but I will have to get
a copy of the code and bring it to this computer in order to give you those
work-arounds, since I work on a classified system and have to access the
Internet on a separate computer (what a pain).

I have search for some acknowledgement by Microsoft of this datagrid bug,
and I have been surprised that it does not appear to be addressed. That is
why I am presently here. I am hoping some genius can steer me to bug fixes or
better work arounds.

I'll get that code and post another reply shortly.

Steve
 
G

Guest

The other methods I metioned in the previous post are as follows:

Toggle the grid.ReadOnly=true, then false, then true again. Bizarre, yes,
but it appears to work.

A better work around for me was to perform another grid layout as in the
following:

grid.PerformLayout();

Even with this work-around, I still have issues that likely do not impact
many other people, so I would really appreciate some kind of "fix" rather
than a work-around.

Hope I have helped.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top