How to subscribe to selection change event for all grids on site/page

2 posts, 0 answers
  1. Oleksandr
    Oleksandr avatar
    6 posts
    Member since:
    Dec 2014

    Posted 26 Dec 2014 Link to this post

    I'm trying to extend telerik kendo grid with some custom functionality (buttons). It relies on row selection. Is it possible to subscribe to selection change event for all grids on page, including those which are not rendered yet? It should work in analogy to the on() jquery method.

    What I want to achieve is basically enabling/disabling some grid buttons in toolbar based on whether a row is selected or not. So maybe I'm going into wrong direction from the start and it can be done easier?
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 05 Jan 2015 Link to this post

    Hello Oleksandr,

    In general, you cannot wire the change event of non-existing widget. It needs to be initialized in order to wire its events. Once they are rendered, you can use jQuery to wire the change event manually. Check this Dojo demo for more details.

    If you want to modify widget on row selection, then wiring the change event is the correct approach.

    Regards,
    Georgi Krustev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top