I want to delete the currently selected record. How do I accomplish this? I have this, but it doesn't seem to do anything. I am bound to a dataview.
theDataGrid.DataItems.Remove(theDataGrid.SelectedItems.Records[0]);
theDataGrid.ExecuteCommand(DataPresenterCommands.EndEditModeAndAcceptChanges);
Thanks,
Rod
Nevermind, I figured it out myself...
theDataGrid.ExecuteCommand(DataPresenterCommands.DeleteSelectedDataRecords);
I tried using theDataGrid.ExecuteCommand(DataPresenterCommands.DeleteSelectedDataRecords), but my record is not getting deleted. I don't understand why?
I have to something else to achieve the task.
Thanks in advance.
Mital