TreeList: Focus custom column control to select entire row

0 Answers 61 Views
TreeList
lucerias
Top achievements
Rank 1
lucerias asked on 19 Aug 2022, 04:08 PM

Hi,

I have custom column which contains buttons, how to select the entire row when I focus on the button control?

Thanks.

Nikolay
Telerik team
commented on 24 Aug 2022, 07:40 AM

Hi lucerias,

You can use the select() method to select the desired TreeList row, for example:

{ command: [
        {
          name: "details",
          text: "Select row",
          click: function(e) {
            // e.target is the DOM element which represents the button
            var tr = $(e.target).closest("tr"); // get the current table row (tr)
            $("#treelist").data("kendoTreeList").select(tr);
          }
        }
      ]}

Dojo demo: https://dojo.telerik.com/iVeVejOs

Let me know if you have any questions.

Regards,

Nikolay

No answers yet. Maybe you can help?

Tags
TreeList
Asked by
lucerias
Top achievements
Rank 1
Share this question
or