473,382 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Datagrid scroll disabled (unitentionally)

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
4 5885
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Hans [DiaGraphIT] | last post by:
how can I keep track of the first visble line in my datagrid when I drag the vertical scrollbar up or down? To clairfy my need... An example: I wish to set CurrentRowIndex to be the first...
2
by: Juan | last post by:
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... ...
2
by: Mark | last post by:
When using a datagrid contol my scroll bars are always disabled. How can I enable my scroll bars on a datagrid control.
0
by: Grant Smith | last post by:
I've been creating my own datagrid control which I'm inheiriting from the standard datagrid control and I have come across two very interesting behaviors with the datagrid control. 1. If you...
4
by: Bill Sonia | last post by:
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...
3
by: Phillip N Rounds | last post by:
I have a DataGrid in a web form (ASP1.1, C#, VS 2003) that I'm trying to add some functionality to, and I can't figure out how to do int. The existing DataGrid has several databound columns and a...
0
by: Greg | last post by:
I've made a datagrid multiline (for anyone interested, I used an adaptation of the code at http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp). This has introduced a very serious issue: the vertical...
3
by: Brian Tkatch | last post by:
I have a form with two DataGrids, which are kept in sync manually via Stored PROCEDURE calls. That is, when a record is selected on the first grid, a stored PROCEDURE is CALLed to Fill() the next...
2
by: velocius | last post by:
i use the current code to reselect a line of code in my datagrid int currentRow = dgUsers.SelectedRows.Index; dgUsers.Refresh(); dgUsers.Rows.Selected = true; this reselects the line (it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.