By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

DataGridView DataBinding

P: n/a
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
Share this Question
Share on Google+
9 Replies


P: n/a
did you call the datagrid.bind() in your form load?
Mar 30 '06 #2

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
that would explain it... i'm trapped in 2003.NET
Mar 30 '06 #7

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.