How to get cell containg Text from datagrid in Winforms
-
Hai all, I have a problem datagrid in Winforms about getting the selected row containing cells value,I know this is very simple in web application but i am new for win application can you please give the idea. ranandbe
Hi, If u want each column value of selected row then loop it with ColumnNumber TextBox2.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, DataGrid1.CurrentCell.ColumnNumber)
-
Hi, If u want each column value of selected row then loop it with ColumnNumber TextBox2.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, DataGrid1.CurrentCell.ColumnNumber)
-
:~ Hi thanks for reply, I can't get the Item property for that grid in Windows Forms Application, i thought you mentioned the web form grid control, is there any way to get web form grid control to win forms application. ranandbe
yes in windows application only u wil have item property check once again Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged TextBox2.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, DataGrid1.CurrentCell.ColumnNumber) End Sub