We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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.
Live Chat Icon For mobile
Up arrow icon