Need help IF DATAGRID NO HAVE VALUES TEXTBOX EMPTY
Thank you
- private void testDataGridView_SelectionChanged(object sender, EventArgs e)
- {
- if (testDataGridView.SelectedRows.Count > 0)
- {
- string test = testDataGridView.SelectedRows[0].Cells["columnname"].Value.ToString();
- testTextBox.Text = test;
- }
- }
Gajendra JangidPosted Mar 25, 2019, 12:50 AM
you want to say that, if your datagrid does not have any row then your textbox will empty: