Using MultiSelect column to achieve Mutli Column design

1 Answer 26 Views
MultiColumnComboBox MultiSelect
Benjamin
Top achievements
Rank 2
Iron
Veteran
Benjamin asked on 24 Jun 2022, 01:49 AM

Hi,

 

I was researching available control in Kendo to achieve my requirements it seems that multi-select control is what I need. but I am unsure how i do the templating for the control. my markup for the dropdown is 


<select id="users">
<option value="1" data-email="abc@email.com">User 1</option>
<option value="2" data-email="12@email.com">User 2</option>
<option value="3" data-email="adc@email.com">User 3</option>
<option value="4" data-email="anmf@email.com">User 4</option>
</select>

 

what I wanted to achieve is when the user is selecting the option to show User 1 - abc@email.com. then upon selected, the tag to show User 1.

 

I understand that multi-column combo box is able to achieve this but i need to be able to select multiple options. I also prefer to render the control via HTML way instead of using json data source

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 28 Jun 2022, 02:16 PM

Hello, Benjamin,

The behaviour can be achieved through the itemTemplate and the tagTemplate configurations. Here is a small example for reference.

Let me know if you have any further questions.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Benjamin
Top achievements
Rank 2
Iron
Veteran
commented on 28 Jun 2022, 03:00 PM

thanks for the reply.

Can this be achieve without using xml, json and jsonp datasource but by using only html. Eg: <option data-email=“abc@email.come” value=“1”>User 1 </option>

Neli
Telerik team
commented on 01 Jul 2022, 10:10 AM

Hi Benjamin,

The templates can be used also when the MultiSelect is initialized form existing <select> element. Here you will find such Dojo example.

I hope this helps.

Regards,

Neli

Benjamin
Top achievements
Rank 2
Iron
Veteran
commented on 01 Jul 2022, 11:43 AM

I tried editing the dojo to show the email in item template but receive an undefined message. I do not want to append the email to the value. Is there any way to achieve this?
Neli
Telerik team
commented on 06 Jul 2022, 10:46 AM

Hi Benjamin,

I am afraid that when the MultiSelect is initialized through existing <select> element with<option> tags only the text and value fileds are available in the template. In case you need to use more fields I would suggest you to configure e dataSource as demonstrated in the Dojo linked here.

Regards,

Neli

Tags
MultiColumnComboBox MultiSelect
Asked by
Benjamin
Top achievements
Rank 2
Iron
Veteran
Answers by
Martin
Telerik team
Share this question
or