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

Multiselect Dropdownlist in TreeGrid

Hello,
I would like to know how to implement multiselect dropdownlist in TreeGrid's Inline Editing.
I am currently using ASP.NET MVC Syncfusion version 15.2.0.40.
Thanks


1 Reply

JD Jayakumar Duraisamy Syncfusion Team June 19, 2017 04:20 PM UTC

Hi Marie, 
Thank you for contacting Syncfusion support. 
In the TreeGrid dropdown column, we have a column property called “DropDownEditOption” to customize the dropdown control properties. 
For enable multiple selection in the dropdown list, we have to enable API’s called “MultiselectMode” and set the mode as “Delimiter or Visual Mode”. if you require multiple selection with checkbox then set ShowCheckbox as true. 
Please refer the following code snippet. 
//DropDown object/Model 
@{ 
    var opt = new Syncfusion.JavaScript.Models.DropDownListProperties(); 
    opt.DataSource = ViewBag.dropData; 
    opt.DropDownListFields.Text = "text"; 
    opt.DropDownListFields.Value = "value"; 
    opt.MultiSelectMode = MultiSelectModeTypes.Delimiter; 
    opt.ShowCheckbox = true;     
    } 
 
@(Html.EJ().TreeGrid("TreeGridContainer") 
//… 
.Columns(co => 
           {   
           co.Field("Priority").HeaderText("Priority").EditType(TreeGridEditingType.Dropdown). 
                DropDownData(opt.DataSource).DropDownEditOptions(opt).Add(); 
}) 
 
 
We have also prepared a sample for your reference. Please find the sample location as below, 
Please let us know, if you require any other assistance. 
Regards, 
Jayakumar D 


Loader.
Up arrow icon