473,837 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with a column in datagridview control

Hello,

I am reading data from a sql server table that is under replication. This
table has the replicatin GUID column that is generated with replicatin. I am
reading the data from a dataAdapter/Dataset using a dataview which is the
data source for a datagridview control. When I scroll horizontally in the
datagridview control and reach this GUID column (which is not at the end of
the table) it raises the datagridview dataError event. If I continue to
click on the scrollbar button I keep getting the dataerror until I am past
the GUID column. Then I can scroll to the end of the datagridview control
backwards OK. But when I scroll forward again and reach the GUID column, I
raise the error again.

Is there a way in the dataview object that I can limit what columns are
visible from my table. I realize I could do this in the datasource select
statement, but that is a lot of columns. I am doing Select * from tbl...
How can I make this GUID column not show up in the datagridview control? Or
is there a way to deal with GUID columns in a dataview/datagridview control?

Thanks,
Rich
May 15 '06 #1
1 2314
I figured this one out. The trick is in the datagridview control not the
dataview object:

datagridview("G UIDcol").Visibl ie = False

Now this column does not show up, and my problem has gone away.

"Rich" wrote:
Hello,

I am reading data from a sql server table that is under replication. This
table has the replicatin GUID column that is generated with replicatin. I am
reading the data from a dataAdapter/Dataset using a dataview which is the
data source for a datagridview control. When I scroll horizontally in the
datagridview control and reach this GUID column (which is not at the end of
the table) it raises the datagridview dataError event. If I continue to
click on the scrollbar button I keep getting the dataerror until I am past
the GUID column. Then I can scroll to the end of the datagridview control
backwards OK. But when I scroll forward again and reach the GUID column, I
raise the error again.

Is there a way in the dataview object that I can limit what columns are
visible from my table. I realize I could do this in the datasource select
statement, but that is a lot of columns. I am doing Select * from tbl...
How can I make this GUID column not show up in the datagridview control? Or
is there a way to deal with GUID columns in a dataview/datagridview control?

Thanks,
Rich

May 15 '06 #2

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

Similar topics

4
10088
by: Aaron Smith | last post by:
Ok, this is an odd one, but I could use some assistance with the framework 2 in VB.Net... I want to have a DataGridViewColumn, only have it use the ComboBox, then when they drop down the combobox, open up another datagridview instead of the combobox dropdownlist. The reason I want to do this, is so I can show more than one column at a time in the drop down list. Instead of trying to make a multi-column combo, I thought it would be much...
2
15170
by: Bob | last post by:
How do I show a calendar control or another appropriate control to pick a date and time for a cell in a column in a datagridview? Thanks for any help. Bob
2
4700
by: Martin | last post by:
Hi all, This is the situation... DatagridView Control with datasource set to datatable. I want the user to be able to delete x number of rows by selecting a row with mouse then clicking a 'delete' button. Then user clicks a 'Commit' button to update the database.
5
2183
by: explode | last post by:
I made a procedure Public Sub Novo(ByVal nova1 As String, ByVal nova2 As String) that creates a new oledbDataAdapter with insert update select and delete commads. I also added that commands can change depending how many columns are in a Table. I add a new column with this code: Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Try...
9
1671
by: active | last post by:
I need a control that displays a grid of rectangles. That is, like a brick wall except the rectangles are lined up. In VB6 I used such a control (may have been called FlexGrid but I'm not sure.) I did see the DataGrid control but that seems oriented to DB usage. It's probably much more complex than what I need, but I'm not sure about that!
1
2482
by: Jeff | last post by:
Hey ..NET 2.0 I've created a User Control which contain a DataGridView. This User Control is displayed on a TabPage. This TabPage is added to the TabControl during runtime. The problem is this: Lets say if I set the size on the DataGridView to width=400px &
1
1854
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
I've been away from web programming for a while and I have a situation that's new to me. I'm using VB/Dot Net 2.0. I've created an xsd (dataset) in the project and dragged some fields from a table into it. This query is intended as readonly. I've already successfully bound a datagridview to the query using an Object Data Source. The query result can easily return several hundred records so paging is enabled. As I said, the query...
3
3890
by: VC | last post by:
Hi, could someone points me to a article, whitepaper or other about how to create a simple custimized column for a (2008 .net) DataGridView windows form control? I've saw a lot of sample over the internet but all of them too much complicated. I just need something simple since I'm a begginer in C#. Thanks in advance.
0
5663
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be blank unless they are filled by the user. 2) As soon as the user enters a cell, the dtp control should appear as the editing control of that cell. If there's a value in the cell beforehand, that value is set as the value of the dtp editing control...
0
9851
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
10902
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10286
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
5680
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
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4481
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
4060
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3128
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.