Hello,
I'm having trouble deleting Selected Rows on the XamDataGrid.
The Code:
{
DataPresenterCommands.DeleteSelectedDataRecords.Execute(null, My_Grid); My_Grid.UpdateLayout();
}
seems not to work for me. Code executes but there is no error message and nothing changes on the grid. I also tried:
My_Grid.ExecuteCommand(DataPresenterCommands.DeleteSelectedDataRecords);
which leads to the same behavior.
The Grid.Fieldsettings CellClickAction was set on "SelectRecord". Is there anything I don't see?? Perhaps it's a beginner question but any help would be highly appreciated. Added a simple sample project.
Is the Deleting behavior of the Grid connected to the DataSource ??
( In the example I am using the grids BindToSampleData = "true" property.)
If so ... which requirement must be met in order to have the possibillity to delete a record??
Using BindToSimpleData (Xml based data source) property, you would not be able to delete the records. If you supply a use case data source. If you supply any data source - IEnumerable - ObservableCollectioN<T> or DataTable, etc this will be working correctly.
My_Grid.DataSource = new List<int>() { 1, 2, 3, 4, 5 };