Try to use XamGrid with following xaml:
<ig:XamGrid AutoGenerateColumns="false" ItemsSource="{Binding ....}" DeleteKeyAction="DeleteRowOfActiveCell" CellClicked="XamGrid_CellClicked_1" KeyUp="XamGrid_KeyUp_1"> <ig:XamGrid.SummaryRowSettings> <ig:SummaryRowSettings AllowSummaryRow="Bottom" SummaryScope="ColumnLayout" SummaryExecution="PriorToFilteringAndPaging" /> </ig:XamGrid.SummaryRowSettings> <ig:XamGrid.SortingSettings> <ig:SortingSettings FirstSortDirection="Descending" AllowMultipleColumnSorting="True" /> </ig:XamGrid.SortingSettings> <ig:XamGrid.Columns> .......... </ig:XamGrid.Columns> </ig:XamGrid>
private void XamGrid_KeyUp_1(object sender, KeyEventArgs e){ if (e.Key == Key.Insert) { //...... } if (e.Key == Key.Delete) { //...... }}
Then run the app, I have problem as below:
Ins/Del key can't be captured when click on any cell in the grid. Only when Click on the header of the grid, then hit the keyboard, Keyup event handler XamGrid_KeyUp_1 will be captured.
What I want is:
When click on any cell in the grid(select the row), then hit Del key to delete the row from grid.
At any time when XamGrid got the cursor(either by click Header or click on any cell inside the grid), hit Ins key will insert a row in the grid.
How to resolve this problem?
Hello,
I have been looking into your issue and would you please tell me which version of our assembly files you are using like e.g. : 12.2.20122.2179 ?
Looking forward to hearing from you.
The file version I used for XamGrid is 12.1.20121.2101.
I am just checking if you require any further assistance on the matter.