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
530
MultiColumn Combobox
posted

Hi,

I'm looking for a way to get a multiline combobox, because with valuekey and textkey I only have one column that is shown.

e.g. customer number, customer first name, customer family name which should be all shown when opening the combobox (comparable to the infragistics win forms combobox)

And which possibilies do I have, if i want to save the first customer name of the chosen datarow in a textfield.

txtTextfiedl.value = row("customer").customerfirstname

do you have an samples for this case, I could not find anything in the infragistcs samples.

Thank you.

Parents
No Data
Reply
  • 23953
    Offline posted

    Hi,

    You can use a template to do that. Just define itemTemplate property of the igCombo. Use ${FieldName} syntax to put your data fields in the template string (Example: itemTemplate: "${FirstName} ${SecondName} ${LastName}"). However there is a little problem. When you select item from the combo the string in the combo will not be the string from the item, but only the value of the column declared in the nameKey property.

    You can use the igCombo.value method to get the selected value.

    Alternatively you can bind to selectionChanged and use the ui.items[0].value .

    I've attached a sample which demonstrates the described solution.

     

    Hope this helps,

    Martin Pavlov

    Infragistics, Inc.

    igCombo_rowTemplate.zip
Children