Accessing Individual Cell values in DataGrid

Greetings! I am looking for an easy way to access the individual cell values in a datagrid and store each one in a string variable to be used in an SQL Update Statement using VB.NET. Any ideas will be most helpful as I am in the learning process here. Sincerely, Randy

1 Reply

OU Oussax December 16, 2002 12:18 PM UTC

I can help you in giving you a way to access the data in a specific cell. Just try this and i think that your problem will be solved: // Create a cell DataGridCell cell = new DataGridCell(); // Give the row number and column number cell.RowNumber = 1; cell.ColumnNumber = 0; // Insert data in the cell myDataGrid[cell] = "Hello World"; // Retrieve data from the cell MessageBox.Show(myDataGrid[cell].ToString());

Loader.
Up arrow icon