Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1530
Removing selected item from datasource causes automatic activation of another record w/o setting new selected item
posted

HI there!

I read the other thread related to activation and selection but found no information that solves my problem.

How do I add the activated record to list of SelectedItems.Records?

In my szenario a record A is selected and is active.

Now this record gets deleted in the grids datasoure. The grid now deletes this row correctly and activates the row of record B.

How do i get this record B a selected record????

In event RecordActivated e.Record I get record B. But the SelectedItems.Records still contains thedeleted record A. SelectedItemsChanged will not be fired.

For a single selection it would be ok, if I just clear the SelectedItems.Records and Add the acivated record B.

In case of multiselection, I can't do this because the operation of multiselection will break.

Szenario: I have records A to C and a is selected.
When performing a multiselection, holding down the SHIFT key and clicking on record C, RecordActivated gets fired and e.Record is record C. But SelectedItems.Records do not contain the whole new selection (A to C), just the old one A.

In this case I can't clear the SelectedItems and add C.

SelectedItemsChanged will be fired afterwards containing the new selection.

 

How can I solve this problem? How do I get the new selection for the new active record if the active record changed is initiated by the grid itself?

By the way: why does the SelectedItems.Records contains records, when the datasource is complete empty?

Best regards

cew3

Parents
No Data
Reply Children
No Data