473,748 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No Horizontal scrollbar on dynamic DataGridView

Hi,

I've posted on this before, but was unable to get help. I really would
like to use this control, but I can't offer it to my users until I am
able to resolve this problem.

I am creating several DataGridViews dynamically on a tabcontrol in a
WinForm (Visual Basic 2005) and then setting the datasource and
datamember properties to point to a datatable. The code appears to work
well, except that no horizontal scrollbar appears, even though the
total width of the columns is much greater than the visible area. I
have to click on a cell and use the arrow keys to see cells outside the
visible area.

Can anyone help? Has anyone ever experienced this? Here is the code --

Dim tabDetails As TabPage
'Dim DetailsBindingS ource As BindingSource
Dim dgvDetails As DataGridView

tctlDetails.Tab Pages.Clear()
If PortDetailsData Set IsNot Nothing Then
For Each dt As System.Data.Dat aTable In
PortDetailsData Set.Tables

Me.tctlDetails. TabPages.Add(dt .Rows(0).Item(" MSC_NAME"))
tabDetails =
tctlDetails.Tab Pages(tctlDetai ls.TabPages.Cou nt - 1)
dgvDetails = New DataGridView()
AddHandler dgvDetails.Data BindingComplete , AddressOf
DataGridView_Da taBindingComple te
With dgvDetails
.Visible = True
.AllowUserToAdd Rows = False
.AllowUserToDel eteRows = False
.AllowUserToOrd erColumns = True
.AllowUserToRes izeColumns = True
.AutoGenerateCo lumns = True
.AutoSizeColumn sMode =
DataGridViewAut oSizeColumnsMod e.AllCells
.DataSource = PortDetailsData Set
.DataMember = dt.TableName
tabDetails.Cont rols.Add(dgvDet ails)
dgvDetails.Dock = DockStyle.Fill
End With
Next
End If

Thanks!!!

Apr 11 '06 #1
0 1779

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
11193
by: Jsp | last post by:
I created a vertically scrolling div. On initial rendering, Firefox shows a horizontal scrollbar in this div, over the complete width. Resizing the width of the window/viewport makes the horizontal scrollbar disappear and never come back again, because the content is "liquid". Resizing the window/viewport vertically, makes the scrollbar come back again. IE and Opera don't show this behaviour. Page: http://www/lahaina.nl/index.htm CSS:...
4
3795
by: anna | last post by:
How to tell if a horizontal scrollbar is present? I only want to use scrollTo if horizontal scrollbar is present. window.scrollbars.visibility doesn't specify which scrollbar is present, so it gives a false result if there is vertical scrollbar but not horizontal scrollbar. TIA, Anna
4
2962
by: Sakharam Phapale | last post by:
Hi All, I have installed VS .NET 2002 on my machine. I have checked both Vertical scrollbar and Horizontal Scrollbar options, in Tools -> Options-> Text Editor-> General-> Vertical Scrollbar Horizontal Scrollbar
10
12145
by: Crazy Cat | last post by:
Hi, I am dynamically creating datagridviews for my application, then filling them with data from a 30 row datatable, and everything seems to work great with one exception. My horizontal scrollbar never appears -- no problem with the vertical scrollbar. I even try setting the scrollbars property to Both, but still I only see the vertical scrollbar. Is there any other way to force the DataGridView's vertical scrollbar
14
3953
by: Michael Weis | last post by:
Hello all, as a non-professional in these things, I searched for this topic but found no satisfying answer: I have to create a site with 3 frames. (Please no diskussion about the sense of using frames...) The main frame has to show a vertical scrollbar if content is bigger than one display page. This works well, but:
2
7449
by: Rich | last post by:
Hello, Some database applicatins have a tooltip feature where when you are dragging the scrollbar of the table view a tooltip appears next to the mouse cursor displaying the approximate record number you are scrolling past (Excel, Access). Sql server has the rownumbers on the Row Header column of its table view. Ideally, I would like to add row numbers to the Row Header column of the datagridview like sql server - Any suggestions...
1
9339
by: malpani.abhijit | last post by:
Hi, I am having a ListView component in my WinForm, when i add some images into it, it gives me a vertical scroll bar. What i want is, the horizontal scrollbar instead of vertical. Is there any way to hide the vertical scrollbars and display horizontal scrollbars?
3
5960
by: j0rd4n | last post by:
I have a user control that needs to allow vertical scrolling but not horizontal scrolling. In the user control's resize event, I need to adjust the size of all the children controls. For this to work correctly, I need the AutoScroll to not enable the horizontal scrollbar. After researching MSDN, I found the HScroll which can be used to disable horizontal scrolling when the AutoScroll mode is enabled. However, when I disable HScroll,...
1
13743
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is inconsistent in the detection of a vertical scrollbar. This involves situations when less than the client area is needed to hold the small amount of data. The inconsistency is when adjusting the panel size within or just below the bottom row....
0
9386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.