Hi,
I have a form with some textbox controls.I am using a bindingsource to bind data to these controls.
For Example, i use
txtbx.DataBindings.Add("text", bindingSourceName, "Ds_Column_name") to bind data to the control.
This works fine and i could see the data.
Now, i have one more form with a datagrid and in the Grid_DoubleClickCell event i am taking the value of a column of the activerow.Here in this Doubleclick event i have declared an object of form1 and passing the activerow value to the constructor in form1.
Following is the one i am talking about:
string wrNumber = Grid1.ActiveRow.Cells["WR_NUMBER"].Value.ToString();
uiJobs uiJobsObject = new uiJobs(wrNumber);
Now, in form1 constructor i have written this:
public uiJobs(string wrNumber)
{
LoadDataSet(....);
BindControls();
}
private void BindControls()
{
bindingSource.DataMember = ".....";
bindingSource.DataSource = ds;
txtbx.DataBindings.Add("text", bindingSourceName, "Ds_Column_name");
}
Now, here the i am getting nothing..I am unable to bind data.....
Could please anyone help me out.
Thanks,
Pavan.