By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,213 Members | 1,965 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,213 IT Pros & Developers. It's quick & easy.

Where's the DataGrid scrollbars (winforms) ?

P: n/a
Hi all,

I have to problems concerning datagrids, tabcontrols and scrollbars:

1) I created a form with a TabControl. This TabControl has two TabPages: the
first with a datagrid to browse database records and the second with some
controls
(TextBoxes, OptionButtons...) to edit these records. When the second tab is
shown and I use the DataGrid's SetDataBind method, the grid scrollbars are
disabled.

2) Another problem is that the scrollbars appears in the middle of the grid
when loading the form. Its position are corrected when the user clicks the
grid, but I could'nt do this programatically. I tried to clear the datagrid
controls collection (DataGrid.Controls.Clear), but doing this the scrollbars
disapears, and its area are not repainted.

Does anyone knows how to solve these problems?
Thanks in advance,

Fabrício de Novaes Kucinskis.
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Fabrício de Novaes Kucinskis" <fa*********@uol.com.br> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
2) Another problem is that the scrollbars appears in the middle of the grid when loading the form. Its position are corrected when the user clicks the
grid, but I could'nt do this programatically. I tried to clear the datagrid controls collection (DataGrid.Controls.Clear), but doing this the scrollbars disapears, and its area are not repainted.
Sorry, I can't offer any help here, but I have this problem in SqlBuddy
(http://sqlbuddy.sourceforge.net) and would really appreciate any
explanation/workaround anyone can offer! It's almost as if the datagrid
doesn't realise how much space it's consuming, and therefore shows
scrollbars for it's 'default' size. Any gurus got any thoughts on this? When
you do anything to cause the grid to redraw itself, the scrollbars
disappear, but as Fab said, you can't trigger this programatically.

Tobin Harris
Fabrício de Novaes Kucinskis.

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.