How to set dropdown edit type for the JavaScript TreeGrid column ?
It is possible to set the edit type as dropdown in TreeGrid column. We can also customize the data inside drop down with or without checkbox. So that we can choose single or multiple options from the drop down box. Please find the below code snippet to set dropdown edit type for the TreeGrid column.
<div id="TreeGridContainer" style="width:100%;height:450px;"></div> <script type="text/javascript"> var projectResources = [ { id: 1, text: "Project Manager", value: "Project Manager" }, { id: 2, text: "Software Analyst", value: "Software Analyst" }, { id: 3, text: "Developer", value: "Developer" }, { id: 4, text: "Testing Engineer", value: "Testing Engineer" } ]; $("#TreeGridContainer").ejTreeGrid({ columns: [ //… { field: "Resources", headerText: "Resources", editType: "dropdownedit", dropdownData: projectResources, editParams: { fields: { text: "text", value: "text" }, showCheckbox: true } } ], }); </script> |
A sample to define and enable the dropdown data in TreeGrid is available in the following link.
Conclusion
I hope you enjoyed learning about how to set dropdown edit type for the JavaScript TreeGrid column.
You can refer to our JavaScript TreeGrid feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our example to understand how to create and manipulate data JavaScript TreeGrid.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!