473,327 Members | 1,979 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,327 software developers and data experts.

Binding to datagridview

VMI
I have a datatable with 3 fields, and I want to bind each one of these
fields to one my Windows datagridview. In my case I have three datagridviews
with one column each. Is this possible? Even if the grid has one column,
when I bind the datatable with this grid, it'll display all three fields.
I'm using VS2005 v2.0 and winforms.

Any help is appreciated.

Thanks.
Apr 19 '07 #1
2 2146
Set AutoGenerateColumns to false, and manage the columns yourself,
using DataPropertyName to specify the field name.

Marc

Apr 19 '07 #2
VMI
Thanks for the info. I thought this grid was like the Web Form grid where
the property could be set at design mode.

Thanks again.

"Marc Gravell" <ma**********@gmail.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
Set AutoGenerateColumns to false, and manage the columns yourself,
using DataPropertyName to specify the field name.

Marc

Apr 19 '07 #3

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

Similar topics

3
by: abc my vclass | last post by:
There are some programs written on .NET 1.1. These applications are apply n-tiers contains Data Access Layers or Business Logic Layer. Now, our company upgrade to .NET 2.0 and enhance or rewrite...
2
by: Nathan | last post by:
Hi, I have a datagridview bound to a List of objects (ObjectA). Each ObjectA contains an ObjectB property. Class ObjectA { public ObjectB objB {} }
7
by: Nathan | last post by:
I'd like to use an enumeration as a datasource for a drop-down box. Is there a way to do this?
2
by: Rich | last post by:
Hello, Following an example at http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker) on binding a dataRelation to a Datagridview for sqlClient, I was able to view rows...
2
by: Bob | last post by:
Got a datagridview with records bound to tableParent. Each time I go to a new row (single select) in the datagrid view I want a series of textboxes as well as another datagridview to shwo the...
2
by: plmanikandan | last post by:
Hi, I am using .net framework2.0,Visual Studio 2005.I need to bind the hash table to datagridview.Is it possible I am having class Person class person { public int no; public string name; }
3
by: =?Utf-8?B?Sm9obiBCdW5keQ==?= | last post by:
New to databinding in vs2005, I always did it manually in 2003. I have no problem loading comboboxes, and a change in that combobox changes the data in the textboxes but I can not figure out a way...
4
by: LMacd | last post by:
I thought binding a list of objects using would be a simple as assigning the list to the data source property of the datagridview object on my C# form through Visual Studio 2005. After reading many...
11
by: dave18 | last post by:
Hello all! I found a solution to my original question, but there's still so much I don't understand about it, I thought I'd give this forum a try. At the very least, maybe it will help someone...
1
by: GS | last post by:
I am perplexed . I thought it is easy to fix the binding error on cvtDtFrom. I only used the cvtDtFrom a couple of places but I found out the error occurred before form loading. I tried...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.