How to find the grid in which the event occured

3 posts, 0 answers
  1. Vijay
    Vijay avatar
    19 posts
    Member since:
    May 2011

    Posted 29 Oct 2013 Link to this post

    Hi,
        I have multiple grids on a page which share the same change function. Is there a way to find which grid has triggered the event. I need to get the id of that grid and I am using plain HTML and jquery to implement all the grids.
    Regards,
    Vijay
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 29 Oct 2013 Link to this post

    Hello Vijay,


    The context of each event is set to the Grid that triggered it and could be accessed via this.
    E.g.
    function myEvent(e){
        var grid = this;
        var id = this.wrapper.attr("id");
    }

     

    Regards,
    Dimiter Madjarov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. nikobellic
    nikobellic avatar
    46 posts
    Member since:
    Feb 2013

    Posted 29 Oct 2013 Link to this post

    Hi Vijay,

    Here is a small sample that accomplishes this.
    http://jsfiddle.net/hLxKV/

    Hope it helps.
Back to Top