bind
IS-IT--Management
- Dec 13, 2004
- 25
Greetings all,
So I have this issue I can't figure out and I'm hopeful one of you will be able to assist me with this problem.
I have a Windows form with a DataGridView and a "dataSet1" dataset.
The DataGridView is bound to the DataSet1 and in the DataSet1 properties under tables I added a table called "Table1" and under that table added 4 columns which are bound to my columns in my datagridview.
I am programatically adding a row of data to the dataset with the following:
dataSet1.Tables["Table1"].Rows.Add(0.Text, 1.Text,2.Text,3.Text);
I have a button that saves the dataset table into a XML file using:
dataSet1.WriteXml(Environment.CurrentDirectory + "\\points.xml",XmlWriteMode.WriteSchema);
When opening the xml file all of my data is indeed populating but the issue I'm having is after adding a row to the dataset, I can't get the datagridview to actually show the data i've added...
I've tried dataGridView1.Refresh(); with no luck, I've searched countless threads on this matter and have tried a few examples but still can't get the datagridview to populate the additions from the dataset.
Can someone please explain to me what I'm missing here?
Thanks a lot!
So I have this issue I can't figure out and I'm hopeful one of you will be able to assist me with this problem.
I have a Windows form with a DataGridView and a "dataSet1" dataset.
The DataGridView is bound to the DataSet1 and in the DataSet1 properties under tables I added a table called "Table1" and under that table added 4 columns which are bound to my columns in my datagridview.
I am programatically adding a row of data to the dataset with the following:
dataSet1.Tables["Table1"].Rows.Add(0.Text, 1.Text,2.Text,3.Text);
I have a button that saves the dataset table into a XML file using:
dataSet1.WriteXml(Environment.CurrentDirectory + "\\points.xml",XmlWriteMode.WriteSchema);
When opening the xml file all of my data is indeed populating but the issue I'm having is after adding a row to the dataset, I can't get the datagridview to actually show the data i've added...
I've tried dataGridView1.Refresh(); with no luck, I've searched countless threads on this matter and have tried a few examples but still can't get the datagridview to populate the additions from the dataset.
Can someone please explain to me what I'm missing here?
Thanks a lot!