i have a datagrid and i am not sure which event to use or how to use it. I want a situation whereby a user clicks or selects an item and it shows in a textbox then i have a button that will delete that item from the database
myBindingSource.DataSource = myDataTable myDataGridView.DataSource = myBindingSource myTextBox.DataBindings.Add("Text", myBindingSource, "SomeColumn")To delete the current row you simply call RemoveCurrent on the BindingSource. That will flag the row as deleted and then, when you call Update on your data adapter, all your changes will be saved to the database, just like calling Fill on the data adapter retrieved the data in the first place.