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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selecting an item in a Multicolumn ComboBox

Thread ID:





150586 Jan 12,2020 09:32 PM UTC Jan 14,2020 09:05 AM UTC Blazor 3
Tags: ComboBox
Asked On January 12, 2020 09:35 PM UTC

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


Attachment: mcbo_test_a18c4e70.zip

Sureshkumar P [Syncfusion]
Replied On January 13, 2020 11:06 AM UTC

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> 
We have modified your sample. Please find the sample here 
Sureshkumar P 

Replied On January 14, 2020 01:45 AM UTC

Thank you quick response and insight!

Sureshkumar P [Syncfusion]
Replied On January 14, 2020 09:05 AM UTC

Hi Dave, 
Sureshkumar P 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon