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

DataGridView DataBinding

Hi all,

I have a DataGridView control in my Windows Forms application. I am
binding it to a DataTable in another assembly. The name of the assembly is
ActivityListDALC. I want to bind my grid to
ActivityListDataSet.ActivityListDataTable in this assembly. I selected this
DataTable in the grid's Properties window and it added a component called
ScheduledCallDataTableBindingSource to my form. I can also see the column
names in my grid. But when I run the application, the grid displays no row.
Do I need to do anything in the form's load event to make sure the grid gets
populated?

Thanks in advance.
Mar 30 '06 #1
9 7010
did you call the datagrid.bind() in your form load?
Mar 30 '06 #2
Thanks. Is DataGrid different from DataGridView?
I din't see DataGrid control in my VS2005 installation. So I used
DataGridView and I don't see any Bind method in DataGridView.

"Jeff" <ju******@jeff.net> wrote in message
news:ig******************@tornado.texas.rr.com...
did you call the datagrid.bind() in your form load?

Mar 30 '06 #3
OK, I checked how many rows there are in ScheduledCallDataTableBindingSource
component and it was empty. I had no rows. So my question is how to fill
this component with data?

"helpful sql" <no****@stopspam.com> wrote in message
news:e9**************@TK2MSFTNGP14.phx.gbl...
Hi all,

I have a DataGridView control in my Windows Forms application. I am
binding it to a DataTable in another assembly. The name of the assembly is
ActivityListDALC. I want to bind my grid to
ActivityListDataSet.ActivityListDataTable in this assembly. I selected
this DataTable in the grid's Properties window and it added a component
called ScheduledCallDataTableBindingSource to my form. I can also see the
column names in my grid. But when I run the application, the grid displays
no row. Do I need to do anything in the form's load event to make sure the
grid gets populated?

Thanks in advance.

Mar 30 '06 #4
Well, now I'm all confused...I know there is a DataGrid control...and an
ADO.NET DataView. But I don't know what a DataGridView is.
Mar 30 '06 #5
So you have never used DataGridView? Are you using VS2005?

"Jeff" <ju******@jeff.net> wrote in message
news:2L******************@tornado.texas.rr.com...
Well, now I'm all confused...I know there is a DataGrid control...and an
ADO.NET DataView. But I don't know what a DataGridView is.

Mar 30 '06 #6
that would explain it... i'm trapped in 2003.NET
Mar 30 '06 #7
Jeff,
that would explain it... i'm trapped in 2003.NET


To make it even more confusing, you were in my idea answering an ASPNET
datagrid.
This is the best example of the not coordinated given names in version 2003.

There are two DataGrids (still in version 2005 however not direct in the
toolbox) one for WindowsForms and one for AspNet. Luckily is this as far as
I have seen better done in version 2005.

Just as addition,

Cor
Mar 31 '06 #8
Helpful,
OK, I checked how many rows there are in
ScheduledCallDataTableBindingSource component and it was empty. I had no
rows. So my question is how to fill this component with data?

I think that this is not possible to answer in the way you ask this.
Do you have code in your DLL to do that,
Do you have code in your DLL that can be used to start that.

If you have a look at the standard Dataset/DataTable as it is generated by
the Designer, than you are already far in the right direction.

Just my idea.

Cor
Mar 31 '06 #9
I use a xml-file and a datagridView like this to display it:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
string filePath = "IP.xml";
ipDataset.ReadXml(filePath);
dataGridView1.DataSource = ipDataset;
dataGridView1.DataMember = "ip";
}

}
Thats all....
Jonte

"helpful sql" wrote:
Hi all,

I have a DataGridView control in my Windows Forms application. I am
binding it to a DataTable in another assembly. The name of the assembly is
ActivityListDALC. I want to bind my grid to
ActivityListDataSet.ActivityListDataTable in this assembly. I selected this
DataTable in the grid's Properties window and it added a component called
ScheduledCallDataTableBindingSource to my form. I can also see the column
names in my grid. But when I run the application, the grid displays no row.
Do I need to do anything in the form's load event to make sure the grid gets
populated?

Thanks in advance.

Jun 2 '06 #10

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

Similar topics

1
by: Dave A | last post by:
Hi, I am struggling with two way databinding in WinForms and the DataGridView. I am binding to business object classes (rather than datatables). If I have a collection of these business...
8
by: | last post by:
I am sure this has been asked and answered, but here goes anyway... VS.Net 2005, VB.Net How can you display more than one field in the displaymember property of a combobox inside the...
3
by: connected | last post by:
I'm having difficulty with populating a DataGridView control with data correctly. It works with a single class, for example... class MyClass { private string _propertyOne; private string...
7
by: Arne Beruldsen | last post by:
in vbnet2005 I have a datagridview. When the user clicks on a row...I would like the contents of certain cells to populate a textbox. To do this...i need to be able to refer to the row and...
3
by: Johnny E. Jensen | last post by:
Hello Dot sure if this it the right group but here goes. I'am using the DataGridView multiple times in my application, and then i'll read a book on inherience, and that opend a new world for...
3
by: mtczx232 | last post by:
I have form that have Datagridview. I want that grid stand on the last record when form open. then user can move down one line to add new record. I not find Property like current_index thet can be...
8
by: Brian Pelton | last post by:
This is on .Net 2.0 in a WinForms application. I have a DataGridView that is bound to a BindingSource. The DataGridView has 3 columns. The first two are "normal" text columns and the last is a...
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: John Wright | last post by:
I have set up a datagrid on my form with six columns. I want to capture the data from six textboxes on the form and add them to the datagrid. All the info I can find about this is with datatables...
12
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...
0
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...
0
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...

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.