DataGrid field data into separate text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can somebody help me? When a user clicks on the Edit button in a data grid,
the record stays in the data grid but text boxes outside the grid are
displayed and I would like to have the data from the grid being displayed in
the text boxes. I have a code for the text boxes that look like this, but I
am getting an "out of index" error:

txtInstitution.Visible=true;
txtInstitution.Text = ((TextBox)e.Item.Cells[3].Controls[0]).Text;
 
Hello,

1) Select the TextBox control on your form.
2) Locate "DataBindings" in the Properties tab.
3) Use the Text option listed under DataBindings.
 
Back
Top