Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI for UI
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
UI Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
I know in the Grid component, there is a visible property that can be set on the columns.command. That works well for conditionally showing a command.
I'm not seeing that in the TreeList. How can I conditionally show a command in a TreeList based on the row data?
Hi, Kevin,
You can use the dataBound event of the TreeList to programmatically show/hide the commands:
dataBound: function(e) { const data = this.dataSource.view(); data.forEach((item) => { if(item.LastName == "Wooten" || item.LastName == "Weber") { const row = this.element.find("tr[data-uid="+item.uid+"]"); // Classes: // .k-grid-add // .k-grid-delete // .k-grid-edit row.find(".k-grid-add").css("display", "none"); } }); }
Runnable Dojo:
https://dojo.telerik.com/@gdenchev/IqasUVaf
Best Regards, Georgi Denchev Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
That worked perfectly, thank you Georgi.
In my case, I was using a custom command so I used the command.className and then used your example to find the action using the custom CSS class name.