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.
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.
thanks.
but I have got problems using this answer.
I use Asp.Net MVC3 with razor syntax vbhtml.
When comparing this combo functionality to the Infragistcs combo win forms, then there are no headings in the itemtemplate combobox.
moreover I can only use 2 fields which are in valuekey or textkey.
and in the selectionchanged function: the items[0].value or items[0].text only contains the values for key and text,
but not those fields I want to use in the itemtemplate.
example: key = employeenumber and text = employeename
but in the itemtemplate I want to use: telephone number / frist / second / family name / department.
and after selecting one row, in my application the text boxes telephone, department, first , second name will be filled with the information,
but items(0).value or text only contains emplyoeenumber and employeename, but not telephone etc ...
in infragistics win forms combo the designer was excellent and easy to handle.
maybe could could send me a sample in ASP.Net MVC, how to deal with such general combobox issues.
thanks in advance.