Wrap the grid request and execute as callback

2 posts, 0 answers
  1. Jacek
    Jacek avatar
    4 posts
    Member since:
    Dec 2014

    Posted 11 May 2015 Link to this post

    Hello,

    I would like to catch the grid request i.e. when sorting or grouping via server and execute on some modal dialog when OK clicked. As I understand on requestStart we can perform some actions, but further execution flow will proceed. In my case I would like to display login dialog + some other login selections and if login succeeds, continue with the request. Is it possible?

    Thanks

  2. Daniel
    Admin
    Daniel avatar
    2231 posts

    Posted 13 May 2015 Link to this post

    Hello,

    You could prevent the request initially by using the event argument preventDefault method and then when OK is clicked and the login succeeds, manually trigger the request with the dataSource read method. You will also need to use a flag or dynamically bind and unbind the requestStart handler so that the request is not prevented when calling read. I created an example that demonstrates the basic logic.

    Regards,
    Daniel
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top