I was wondering if anyone knows how to get text from a cell in a datagrid into a message box or text box? Thanks in advance.

DataGrid1.Item(rowindex,columnindex)

cell_value = DataGrid1.Item(rowindex, columnindex)

Hi

Can any one please guide me how can i use the Combo box in any of the columns in DATAGRID control in vb.net forms .

Thank & Regards
Manish Kaushik

cell_value = DataGrid1.Item(rowindex, columnindex) -------> on what event it should be posted? Thanks. God Bless. :D

I was wondering if anyone knows how to get text from a cell in a datagrid into a message box or text box? Thanks in advance.

You can get the first cell (ie. cell(0)) of the SELECTED row, and send it to TextBox1 by the following code:

TextBox1.Text = ContactInfoDataGridView.CurrentRow.Cells(0).Value.ToString

For the 2nd cell ... use cell(1), for 3rd use cell(2), and so on.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.