G
Guest
Here is the info:
..Net 1.1, C#, Windows Forms
I have a single windows form. I load in a dataset with some data. I bind
the dataset to a grid to a particular DataTable. All works as expected. I
create a user control, stick a text box on it. Expose the Text Property of
the text box as a public property on the UserControl, such as:
public string FirstName{get{return textBox1.Text;}set{textBox1.Text=value;}
I add the user control to the main form by calling this.controls.Add(contr).
I set the databinding by using
usercontrol.DataBindings.Add("Text",dataset,"Customer.FirstName");
So now the form has a datagrid on it, with a usercontrol, which has a
textbox. The form loads, the grid is populated, the CUrrencyManager position
is at 0, the text box is populated with the same data as the right grid cell.
Then you click on the different cells in the grid, but don't make any
changes. Then call dataSet.HasChanges() - > returns true. Why? To test the
theory, remove the line that does the databinding of the user control.
Selecting different rows, does not alter the rowstates on the datarows. I
don't know why this would be, and would really really appreciate help. This
is a case od databinding working too well. . Thank you in advance, sorry
for the lengthy explanation.
..Net 1.1, C#, Windows Forms
I have a single windows form. I load in a dataset with some data. I bind
the dataset to a grid to a particular DataTable. All works as expected. I
create a user control, stick a text box on it. Expose the Text Property of
the text box as a public property on the UserControl, such as:
public string FirstName{get{return textBox1.Text;}set{textBox1.Text=value;}
I add the user control to the main form by calling this.controls.Add(contr).
I set the databinding by using
usercontrol.DataBindings.Add("Text",dataset,"Customer.FirstName");
So now the form has a datagrid on it, with a usercontrol, which has a
textbox. The form loads, the grid is populated, the CUrrencyManager position
is at 0, the text box is populated with the same data as the right grid cell.
Then you click on the different cells in the grid, but don't make any
changes. Then call dataSet.HasChanges() - > returns true. Why? To test the
theory, remove the line that does the databinding of the user control.
Selecting different rows, does not alter the rowstates on the datarows. I
don't know why this would be, and would really really appreciate help. This
is a case od databinding working too well. . Thank you in advance, sorry
for the lengthy explanation.