This is a migrated thread and some comments may be shown as answers.

Grid Command Button Is Not Pulling Nearest "tr"

1 Answer 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cedric Gaines
Top achievements
Rank 2
Cedric Gaines asked on 15 Oct 2016, 05:35 PM

I have a kendo grid running with a command button

 

When I click the button, its appears to not be pulling the closest 'tr' but instead a random 'tr' and then the closest 'tr'

Code:

function showServiceDetails(e){
    e.preventDefault();

    var dataItem = this.dataItem($(e.currentTarget).closest("tr"));

    alert(dataItem.layerSource);

}

I'm not getting the correct rows 'layerSource' instead I get another one, then the correct one???

 

Odd

I've attached a pic of the data

Any insights would be SOO helpful right now.

Cedric

1 Answer, 1 is accepted

Sort by
0
Patrick | Senior Technical Support Engineer
Telerik team
answered on 17 Oct 2016, 09:11 PM
Hello Cedric,

Please take a look at the following Kendo UI Dojo by Progress which illustrates a custom command button. 

We have a demo which shows how to implement custom command buttons, and helpful documentation.

If you still have the same issue, please create a dojo or update the attached example with the current behavior of your Kendo Grid.

Hope this helps!

Regards,
Patrick
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Cedric Gaines
Top achievements
Rank 2
Answers by
Patrick | Senior Technical Support Engineer
Telerik team
Share this question
or