How do I delete a row in a DataGrid ?

  • Thread starter Thread starter Unemployed Programmer
  • Start date Start date
U

Unemployed Programmer

I have a form that has an SqlConnection, SqlDataAdapter & DataSet as
components, and a DataGrid control that has this DataSet as the DataSource.

I do sqlDataAdapter1.Fill( dataSet11, "tableName" ), and the control fills up
properly. I do an update by typing in a new value in a grid, then have a
button click event do sqlDataAdapter1.Update( dataSet11, "tableName" ), and it
updates the datebase. I add a new row to the DataGrid by clicking on the "*"
button, then the Update() call, and it updates the datebase.

But I can't figure out how to delete a row from the grid!

Please help. Thanks
 
Hi,

I don't like it however it is the Alt Del (or ctrl del I always forget which
of the two and try) :-).

I think that it is better to put a delete button on your form.

I hope this helps,

Cor
 
Back
Top