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
140
xamcomboeditor Update SelectedItems from the code
posted

Hi,

I have an ig:xamcomboeditor on the screen with a list of documents(these documents can have different revisions). The combo editor allows multiple selections and has check boxes property enabled. It also has an option added dynamically for Select All. When I check the box against Select All, the system needs to find a list of latest revision documents in combo editor and check the boxes against it and update the selected items for the combo editor.This has to be done dynamically. The user can also uncheck any document if he decidedes not to use it. At that moment, the select All should be unchecked as well. Any ideas on how this can be implemented. I tried to get it working by using the combobox1_SelectionChanged. But it doesnt ticks the check boxes if select all is checked. And if I try to select "Select All" again, it gives me an error.

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello,

    Thank you for your post.

    Please correct me if my following impression is incorrect, but currently I am under the impression that you have a XamComboEditor with multiple selection and inside it, you have an item that acts as a "Select All" type of item. When clicking this item, you want all of the items in the XamComboEditor to become selected, and if you decide to deselect one of those items, you want the "Select All" item to become unselected. Have I understood your requirement correctly?

    If so, I have gone off of the above impression and have created a sample project with this functionality. In the project, I handle the SelectionChanged event of the XamComboEditor and begin by checking the e.AddedItems collection of the event arguments. If the added item is the "Select All" item, then all of the items in the XamComboEditor get selected. The next check is for the e.RemovedItems collection of the event arguments. If the item that was deselected was not the "Select All" item, then I make sure to obtain the "Select All" item if it is selected and deselect it. These items are all obtained from the XamComboEditor's Items collection, and as of yet, I have been unable to see any types of errors occurring when clicking the Select All checkbox. Would it be possible for you to please provide some more detail on this error that you are seeing?

    I have attached a sample project to demonstrate the above.

    I hope this helps you. Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XamComboEditorSelectAllCase.zip
Children