473,698 Members | 2,450 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGridView: show not all columns of DataSource

Hi,

I'm trying to use tha DataGridView of .NET 2. But it doesn't seem to have
something like a tablestyle, permitting you to show only some columns of the
DataSource andn ot all of them.

Does anybody knows how to do this? I want for exemple not that the ID of my
records are shown in the DataGridView etc.

Thanks a lot in advance,

Pieter
Nov 21 '05 #1
3 3516
Pieter,

Did you already right click on it and look at the properties?

Cor
Nov 21 '05 #2
Hehe yes :-) I knwo you can add Columns and set them to visible. But these
are unbound columns!
But what I have is: During the load of the form I get a DataTable, and I
want to take that DataTable as the DataSource of my DataGridVeiw, but only
show some of the columns.

If I use the "Add Column..." it adds this columns, but they stay empty, and
all the other Columns of my DataTable are also added...
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Pieter,

Did you already right click on it and look at the properties?

Cor

Nov 21 '05 #3
Well ok, this is weird... I removed the DataGridView, and redid everything,
and now it works fine... :-/
I guess it has something to do with the Beta 2...

"DraguVaso" <pi**********@h otmail.com> wrote in message
news:uE******** *****@TK2MSFTNG P12.phx.gbl...
Hehe yes :-) I knwo you can add Columns and set them to visible. But these
are unbound columns!
But what I have is: During the load of the form I get a DataTable, and I
want to take that DataTable as the DataSource of my DataGridVeiw, but only
show some of the columns.

If I use the "Add Column..." it adds this columns, but they stay empty, and all the other Columns of my DataTable are also added...
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Pieter,

Did you already right click on it and look at the properties?

Cor


Nov 21 '05 #4

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

Similar topics

3
17238
by: Bob | last post by:
Thinking two things, 1- Creating a userControl -yeah you guessed it, a multi column drop down combobox - I've looked at several articles and did not find what I need, one that's bindable and that I can use in a datagrid view. 2- Extending the datagridview so that it can be added to the list in the column types when editing columns in the datagridview. I'm really getting PO'd at Microsoft for not including a multi column combobox both a...
1
4704
by: mark carew | last post by:
Hi, Problem - An extra column to the left (even with row headers disabled) ---------------------------------------------------------- Apologies if this posting is already in the newsgroup; but have changed to 40tude and can't see it in the newly dowloaded messages. It was originally html (tut tut) so maybe it didn't register. I have tried a new xml file and generated a new xsd file from it using xsd.exe and now the xml file produces...
3
94256
by: sklett | last post by:
I'm changing from a DataGrid to a DataGridView and have run across a problem. The items that are bound to the DataGrid have an int Property that represents a primary key of a lookup table in my database. For example: table JobTypes 1 | Manager 2 | Controller 3 | Supervisor table Employee
7
15652
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is there an equivalent property for the DataGridView? I have searched, but have not found one. I would like the user to be able to see all the columns of the table on one screen - thus eliminating the need to use the horizontal scroll bar to view...
9
2676
by: trint | last post by:
How can I retrieve all of the data from a datagridview? Any help is appreciated. Thanks, Trint
6
2342
by: =?Utf-8?B?TWFyY2Vsbw==?= | last post by:
Hello, I am new to pulling data into VB and using DataGridViews..... so this might be a dumb question but I can not seem to understand how to make this work. What I need acomplished: Exec a select statement and out put the results to a DataGridView. The columns must be created on the fly as the query may return different fields. A small example I got to work to a List box. If you could convert this to a
12
13606
by: cj | last post by:
When viewing a datatable in a datagridview one of the columns in it is a "note" field which can be quite long. I would like to have the note field of the currently selected row of the datagrid display in a textbox below the datgridview. I currently have it fixed so if you click on a row the note field from that row is put in the textbox. I'd like this to be automatic as they move through rows. Also the note field is one of two fields...
1
3372
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons: 1) export to excel button exports the visible columns from the datagridview to excel (this works fine)
1
3778
by: =?Utf-8?B?VGFtbXk=?= | last post by:
Hi! I am using VB 2008 with SQL Server 2000 and SQL Server 2005 (depending which server the user selects to connect to). I have a combox in which the user types the server to connect to. Another combobox that shows the databases in that particular server. Another combobox with the filesets from the selected database above.
6
3215
by: Miro | last post by:
Sorry for the cross post. I am stuck. I have a datagridview for poker rounds. Basically there are 3 columns in this datagridview. "Round" "SmallBlind" "BigBlind" I have an issue when I tab through the new row being added. It does not 'Add' that row, nor setup the 'next blank add row' so I can continue to tab
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8897
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
8862
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...
1
6521
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
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
4370
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
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
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
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.