how to use DataGrid...

  • Thread starter Thread starter LLJ
  • Start date Start date
L

LLJ

When user selected one row from DataGrid, how can i get each cell's
value and show these values into CombBox and text box.


Thank you for any help.
 
In the DataGrid1 click event, do this:

ComboBox1.Items.Add(DataGrid1.Item(DataGrid1.SelectedIndex, 0) ' 0 is the
first column in the datagrid
TextBox1.Text = CType(DataGrid1.Item(DataGrid1.SelectedIndex, 1)) '1 is the
2rd column in the datagrid

And so on.....
Hope this helps.
Stanav.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top