We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Selecting an item in a Multicolumn ComboBox

I'm having trouble selecting a row contained in a ComboBox with complex data.  I can only select by index and not by Value or @bind-Value.  Attached is an example. What am I missing?  I'm using 17.4.0.42

TIA


Attachment: mcbo_test_a18c4e70.zip

3 Replies

SP Sureshkumar P Syncfusion Team January 13, 2020 06:06 AM

Hi Dave, 
 
We would like to inform you that, In the ComboBox TValue property is used to mention the value property type. So when binding the value property as int then you need  to use the TValue as int as mentioned code snippet, 
 
<EjsComboBox ModelType="Customer_Model" TValue="int?" DataSource="@Customers" @bind-Value="@SelectedIndex" > 
<ComboBoxFieldSettings Text="Company" Value="CustomerID"></ComboBoxFieldSettings> 
<ComboBoxTemplates><ItemTemplate><table><tbody><tr><td style="display:none;">@((context as Customer).CustomerID)</td><td>@((context as Customer).Company)</td><td>@((context as Customer).Last)</td></tr></tbody></table></ItemTemplate></ComboBoxTemplates> 
</EjsComboBox> 
 
 
We have modified your sample. Please find the sample here 
 
 
Regards, 
Sureshkumar P 



DA Dave January 13, 2020 08:45 PM

Thank you quick response and insight!


SP Sureshkumar P Syncfusion Team January 14, 2020 04:05 AM

Hi Dave, 
 
 
Regards, 
Sureshkumar P 


Loader.
Live Chat Icon For mobile
Up arrow icon