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.DataBindi ngs.Add("text", bindingSourceNa me, "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_DoubleClic kCell 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.D ataMember = ".....";
bindingSource.D ataSource = ds;
txtbx.DataBindi ngs.Add("text", bindingSourceNa me, "Ds_Column_name ");
}
Now, here the i am getting nothing..I am unable to bind data.....
Could please anyone help me out.
Thanks,
Pavan.
I have a form with some textbox controls.I am using a bindingsource to bind data to these controls.
For Example, i use
txtbx.DataBindi ngs.Add("text", bindingSourceNa me, "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_DoubleClic kCell 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.D ataMember = ".....";
bindingSource.D ataSource = ds;
txtbx.DataBindi ngs.Add("text", bindingSourceNa me, "Ds_Column_name ");
}
Now, here the i am getting nothing..I am unable to bind data.....
Could please anyone help me out.
Thanks,
Pavan.