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

Datagrid scroll disabled (unitentionally)

P: n/a
It seems whenever I set a DataGrid.DataSource = DataTable
(vb.net) to populate a datagrid, the scroll bars on the
datagrid default to disabled. And the only way I can get
them to enable is to manually resize a column width with
the mouse (not very elegant).

Anyone have any ideas how I could enable the datagrid
scroll bars in my code?

Thanks,

~Bill
Jul 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Bill,

I cannot reproduce the problem you experienced. Would you please provide me
with more information so I can deliver my assistance more quickly?

If there's anything unclear, please feel free to reply to this post.

Kevin Yu
========
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bill Sonia" <bi*******@achaiasolutions.com>
| Sender: "Bill Sonia" <bi*******@achaiasolutions.com>
| Subject: Datagrid scroll disabled (unitentionally)
| Date: Fri, 12 Sep 2003 11:27:06 -0700
| Lines: 12
| Message-ID: <09****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN5W3hfGMBFwqY9Ql20t5q2yn5sbA==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108319
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| It seems whenever I set a DataGrid.DataSource = DataTable
| (vb.net) to populate a datagrid, the scroll bars on the
| datagrid default to disabled. And the only way I can get
| them to enable is to manually resize a column width with
| the mouse (not very elegant).
|
| Anyone have any ideas how I could enable the datagrid
| scroll bars in my code?
|
| Thanks,
|
| ~Bill
|

Jul 21 '05 #2

P: n/a
Thanks Kevin, here's the code

myCRCStudy.SearchStudy("")

Me.myDT = myCRCStudy.retDS.Tables(0)
Me.dgStudy.DataSource = Me.myDT

Where myCRCStudy.SearchStudy is a class sub that calls a
web services and receives a dataset. I set my local Data
Table equal to the class data table then I set the
datagrid datasource to the local datatable. The datagrid
is populated with the data table but the scroll is
disabled.

I have roughly 10 datagrids in my app and this disabled
grid problem is re-occurring all over the place. Also I
know it's not a version issue because I've had this
problem with Visual Studio 2002, VS 2003 Final Beta and my
current verion VS 2003.

Is there another way to set the data grid datasource
besides the way I'm doing it?

Thanks,

~Bill
-----Original Message-----
Hi Bill,

I cannot reproduce the problem you experienced. Would you please provide mewith more information so I can deliver my assistance more quickly?
If there's anything unclear, please feel free to reply to this post.
Kevin Yu
========
"This posting is provided "AS IS" with no warranties, and confers norights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bill Sonia" <bi*******@achaiasolutions.com>
| Sender: "Bill Sonia" <bi*******@achaiasolutions.com>
| Subject: Datagrid scroll disabled (unitentionally)
| Date: Fri, 12 Sep 2003 11:27:06 -0700
| Lines: 12
| Message-ID: <09****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN5W3hfGMBFwqY9Ql20t5q2yn5sbA==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108319| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| It seems whenever I set a DataGrid.DataSource = DataTable| (vb.net) to populate a datagrid, the scroll bars on the
| datagrid default to disabled. And the only way I can get| them to enable is to manually resize a column width with| the mouse (not very elegant).
|
| Anyone have any ideas how I could enable the datagrid
| scroll bars in my code?
|
| Thanks,
|
| ~Bill
|

.

Jul 21 '05 #3

P: n/a
Bill,

I also had this problem. Try setting the grid to visible = false prior to
setting the datasource.
Then set visible = true after you have set everything up.

It that doesn't work try playing with the SuspendLayout and
ResumeLayout(false) options.

HTH,
Eric Cadwell
http://www.origincontrols.com
"Bill Sonia" <bi*******@achaiasolutions.com> wrote in message
news:09****************************@phx.gbl...
Thanks Kevin, here's the code

myCRCStudy.SearchStudy("")

Me.myDT = myCRCStudy.retDS.Tables(0)
Me.dgStudy.DataSource = Me.myDT

Where myCRCStudy.SearchStudy is a class sub that calls a
web services and receives a dataset. I set my local Data
Table equal to the class data table then I set the
datagrid datasource to the local datatable. The datagrid
is populated with the data table but the scroll is
disabled.

I have roughly 10 datagrids in my app and this disabled
grid problem is re-occurring all over the place. Also I
know it's not a version issue because I've had this
problem with Visual Studio 2002, VS 2003 Final Beta and my
current verion VS 2003.

Is there another way to set the data grid datasource
besides the way I'm doing it?

Thanks,

~Bill
-----Original Message-----
Hi Bill,

I cannot reproduce the problem you experienced. Would you

please provide me
with more information so I can deliver my assistance more

quickly?

If there's anything unclear, please feel free to reply to

this post.

Kevin Yu
========
"This posting is provided "AS IS" with no warranties, and

confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bill Sonia" <bi*******@achaiasolutions.com>
| Sender: "Bill Sonia" <bi*******@achaiasolutions.com>
| Subject: Datagrid scroll disabled (unitentionally)
| Date: Fri, 12 Sep 2003 11:27:06 -0700
| Lines: 12
| Message-ID: <09****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN5W3hfGMBFwqY9Ql20t5q2yn5sbA==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl

microsoft.public.dotnet.general:108319
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| It seems whenever I set a DataGrid.DataSource =

DataTable
| (vb.net) to populate a datagrid, the scroll bars on the
| datagrid default to disabled. And the only way I can

get
| them to enable is to manually resize a column width

with
| the mouse (not very elegant).
|
| Anyone have any ideas how I could enable the datagrid
| scroll bars in my code?
|
| Thanks,
|
| ~Bill
|

.

Jul 21 '05 #4

P: n/a
Hi Bill,

I've tried your code, but I still cannot reproduce the problem. Please take
a look a Eric's reply. He offered a workaround.

If anything is unclear, please feel free to reply to this post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

--------------------
| Content-Class: urn:content-classes:message
| From: "Bill Sonia" <bi*******@achaiasolutions.com>
| Sender: "Bill Sonia" <bi*******@achaiasolutions.com>
| References: <09****************************@phx.gbl>
<2S*************@cpmsftngxa07.phx.gbl>
| Subject: RE: Datagrid scroll disabled (unitentionally)
| Date: Mon, 15 Sep 2003 08:14:35 -0700
| Lines: 85
| Message-ID: <09****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN7nBJ5DWdu96vLT1alDV6RGbmolw==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.general:108244
| NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Thanks Kevin, here's the code
|
| myCRCStudy.SearchStudy("")
|
| Me.myDT = myCRCStudy.retDS.Tables(0)
| Me.dgStudy.DataSource = Me.myDT
|
| Where myCRCStudy.SearchStudy is a class sub that calls a
| web services and receives a dataset. I set my local Data
| Table equal to the class data table then I set the
| datagrid datasource to the local datatable. The datagrid
| is populated with the data table but the scroll is
| disabled.
|
| I have roughly 10 datagrids in my app and this disabled
| grid problem is re-occurring all over the place. Also I
| know it's not a version issue because I've had this
| problem with Visual Studio 2002, VS 2003 Final Beta and my
| current verion VS 2003.
|
| Is there another way to set the data grid datasource
| besides the way I'm doing it?
|
| Thanks,
|
| ~Bill
| >-----Original Message-----
| >Hi Bill,
| >
| >I cannot reproduce the problem you experienced. Would you
| please provide me
| >with more information so I can deliver my assistance more
| quickly?
| >
| >If there's anything unclear, please feel free to reply to
| this post.
| >
| >Kevin Yu
| >========
| >"This posting is provided "AS IS" with no warranties, and
| confers no
| >rights."
| >
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Bill Sonia" <bi*******@achaiasolutions.com>
| >| Sender: "Bill Sonia" <bi*******@achaiasolutions.com>
| >| Subject: Datagrid scroll disabled (unitentionally)
| >| Date: Fri, 12 Sep 2003 11:27:06 -0700
| >| Lines: 12
| >| Message-ID: <09****************************@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcN5W3hfGMBFwqY9Ql20t5q2yn5sbA==
| >| Newsgroups: microsoft.public.dotnet.general
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.general:108319
| >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| >| X-Tomcat-NG: microsoft.public.dotnet.general
| >|
| >| It seems whenever I set a DataGrid.DataSource =
| DataTable
| >| (vb.net) to populate a datagrid, the scroll bars on the
| >| datagrid default to disabled. And the only way I can
| get
| >| them to enable is to manually resize a column width
| with
| >| the mouse (not very elegant).
| >|
| >| Anyone have any ideas how I could enable the datagrid
| >| scroll bars in my code?
| >|
| >| Thanks,
| >|
| >| ~Bill
| >|
| >
| >.
| >
|

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.