Overiding the test box on a MultiSelect input box

Posted by: grapecity on 4 December 2017, 12:42 pm EST

    • Post Options:
    • Link

    Posted 4 December 2017, 12:42 pm EST

    Can I override the textbox value for the wijmo.input.MultiSelect

    My itemSource and checkedItems are an array of objects, with this structure:

    {

    displayValue: ‘text to be displayed’,

    selected: true,

    value: guid value as a string

    }

    I set the “text” property to a concatenated string of “displayValue”, comma delimited.

    When I select 1 option I see “[object,object]” in the text box.

    When I select 4 options I see “there are 4 selected items” in the text box.

    How do I get my concatenated string into the textbox of the MultiSelect control?

  • Posted 4 December 2017, 9:14 pm EST

    Hi Greg,

    You need to set displayMemberPath to the “displayValue”. This will show the selected items with (,) comma until the number of selected items does not reach equal to maxHeaderItems.

    ~Manish

  • Posted 5 December 2017, 1:04 pm EST

    I already have set displayMemberPath to the “displayValue”.

    but the property is in the object that is in the each array’s element

    
    itemsSource = itemSourceArray 
    
    

    AND

    
    itemSourceArray = [
    					{
    						displayValue: 'Item1',
    						selected: true,
    						value: 'Item1'
    					},
    					{
    						displayValue: 'Item2',
    						selected: true,
    						value: 'Item2'
    					},
    				 ]
    
    
  • Posted 5 December 2017, 5:20 pm EST

    Hi Greg,

    Please refer to the plunker that implements the same.

    http://plnkr.co/edit/OxWWs6dwjzh9KXd12oaZ?p=preview

    Please let me know if you have any further query.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels