Hi,
what's the right way to select/activate a record by code as it would be selected/activated by mouseclick?
My Problem is that I select a record but when I try to select multiple records by holding the 'shift#-key and clicking to another record, just the clicked record gets selected instead of the list of records beginning at the preselected record to the clicked one.
After the click, the multiselection works as expected.
In the attachment I put a small sample to demonstrate the problem and how I try to select the record.
Best regardscew3
Our app is working as expected.
Thank you!
Hi cew3,
I have been further looking into this and I can suggest trying out your sample with only:
MyGrid.ActiveRecord = myRecord;
MyGrid.ExecuteCommand(DataPresenterCommands.ToggleActiveRecordSelectionState);
as it behaves better with the test sample you initially send. I did just now notice that my initial suggestion doesn’t work properly when selecting with the Ctrl key. If you want can also create a private support ticket for you where you can upload your real project, so I can have a look at it as well.
Looking forward to hearing from you.
Hi Petar,
I got it almost to work, but it is very important to keep the right order for
MyGrid.SelectedItems.Records.Clear(); MyGrid.SelectedItems.Records.Add(myRecord); MyGrid.ActiveRecord = myRecord; MyGrid.ExecuteCommand(DataPresenterCommands.ToggleActiveRecordSelectionState);
Best regards,cew3
I see what you mean, I would usually suggest looking into your project myself, however there seems to be a reason for you to have created a separate one. If this because of confidentiality reasons I can suggest you submit a Support Request: https://ko.infragistics.com/my-account/submit-support-request/ or have me create on your behalf.
Please let me know, if I can help with anything else.
Damn, just the problem in the sample is solved.
My application still has the problem.I will have to investigate what's different.
Thank you anyhow!
Bestcew3