Custom Button on TreeList - no action

2 posts, 1 answers
  1. Andy
    Andy avatar
    9 posts
    Member since:
    Oct 2012

    Posted 07 Jul 2015 Link to this post

    I'm trying to add a custom button on a TreeList Toolbar.   I can see that .Toolbar (t=>t.Custom().Text("My Action")) is exactly what I'm looking for, however what is not obvious is how to add the action.   For the Grid, it would be .Toolbar(t=>t.Custom().Action("Action", "Controller").Text("My Action").   Why does TreeList have similiar behaviour?
  2. Answer
    Dimiter Madjarov
    Dimiter Madjarov avatar
    2213 posts

    Posted 08 Jul 2015 Link to this post

    Hello Andy,

    Currently specifying an Action for the TreeList custom commands is not supported. You could attach a click handler by it's data-command attribute.

    .Toolbar(t => t.Custom().Name("mycommand"))

    $(function () {
        $("[data-command='mycommand']").click(function () {
            // custom logic

    Dimiter Madjarov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top