Dataviewgrid horizontal scrollbar not appearing?

J

james

I have the scrollbars property of my grid set to "both". When I have lots of
records, the vertical scroll appears ok, but if the user resizes columns
wider so they go off the side of the form, the horizontal scrollbar never
appears.
Any clues what I am doing wrong?
 
C

Chris Jobson

james said:
I have the scrollbars property of my grid set to "both". When I have lots
of records, the vertical scroll appears ok, but if the user resizes columns
wider so they go off the side of the form, the horizontal scrollbar never
appears.
Any clues what I am doing wrong?

Just an idea - you say "off the side of the form" rather than "off the side
of the grid". Could it be that the DataGridView is wider than the form, in
which case the coilumns could still fit in the grid (so no horizontal scroll
bar) but won't fit in the form?

Chris Jobson
 
P

Paul

Chris Jobson said:
Just an idea - you say "off the side of the form" rather than "off the
side of the grid". Could it be that the DataGridView is wider than the
form, in which case the coilumns could still fit in the grid (so no
horizontal scroll bar) but won't fit in the form?

Chris Jobson

James,

Check to see that the columns don't have their Frozen property set to true.
If you set all the column's Frozen to true, you will get no horizontal
scroll bar.

This can easily happen in the designer if you have a couple columns frozen,
and then add a new column with the insertion point before the last frozen
column. It inherits the frozen property as true, and if you move it to the
end, then all the columns become frozen! Voila, no scroll bar.
 

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