DataGridView... Deleting/finding a row from/in the underlying DataSource (DataTable) Ideas anyone?
-
Hello all, I am having an annoying little problem with accessing an underlying row in a datatable which is being displayed in a datagridview. I need to get hold of the ID column in the DataSource, however it is one of the columns I am not displaying to the user in the DataGridView. I can then fire a stored procedure to delete the correct row from the SQL database. How do i access the row which is currently selected in the DataSource? I know about SelectedRows[] but it doesnt contain my ID column. Thanks in advance...
modified on Tuesday, April 22, 2008 10:18 AM
-
Hello all, I am having an annoying little problem with accessing an underlying row in a datatable which is being displayed in a datagridview. I need to get hold of the ID column in the DataSource, however it is one of the columns I am not displaying to the user in the DataGridView. I can then fire a stored procedure to delete the correct row from the SQL database. How do i access the row which is currently selected in the DataSource? I know about SelectedRows[] but it doesnt contain my ID column. Thanks in advance...
modified on Tuesday, April 22, 2008 10:18 AM
-
when you select row from datagridview then save ID value in one label,use labels value to delete your data based on last selected ID on datagridview.
I Love T-SQL