Grid Command Button Is Not Pulling Nearest "tr"

2 posts, 0 answers
  1. Cedric Gaines
    Cedric Gaines avatar
    9 posts
    Member since:
    Dec 2004

    Posted 15 Oct Link to this post

    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

  2. Patrick
    Admin
    Patrick avatar
    171 posts

    Posted 17 Oct Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top