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

Wrap the grid request and execute as callback

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jacek
Top achievements
Rank 1
Jacek asked on 11 May 2015, 09:59 AM

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

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 13 May 2015, 08:59 AM
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
Tags
Grid
Asked by
Jacek
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or