By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

DataGrid field data into separate text box

P: n/a
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;
Jun 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello,

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

"Antonio" wrote:
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;
Aug 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.