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

[Solved] Grid inside window not triggering onLoad event

1 Answer 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ricardo
Top achievements
Rank 1
Ricardo asked on 29 Jul 2011, 01:39 PM
Hi.

I need to detect when the grid is loaded, so I attached a function to the onLoad event. The problem is that the event is not being called when the grid is called from a window (not the first one, btw).

For example, if you have a grid and some button in the page opens a window (Telerik Window), and then this new window opens a new one (by clicking another button inside this window), and if there's a grid inside the last one, it doesn't trigger the onLoad.

I'm not sure if I was clear enough, but the idea is that, in my application, the user can select information for filtering from another grid inside a modal window. So if the select window itself has filters (custom server-side filters) and the user wants to select a value for that one inside a grid, the last grid doesn't works because it doesn't trigger the event (which I need to trigger my own code).


Thanks,

Ricardo

1 Answer, 1 is accepted

Sort by
0
Ricardo
Top achievements
Rank 1
answered on 29 Jul 2011, 02:13 PM
I think I've found the problem... kind of.

Using Telerik's ClientEvents() to set the event it works. Using a .bind('load') doesn't. I was logging the status of data('tGrid') and data('events'), and in the first and second grids they're undefined. From the third one they're always set, so that's why the "load" event isn't called. It actually is called, but not the right one. :)

The reason why I'm using bind('load') and not using the ClientEvents() is because it's a nameless function to change the way ajaxRequest() works, passing my additional data first (custom server-side filters, again) and then the grid settings. I capture all the filter information on the controller, process it and use it's data on the Where clause on the query.


Thanks anyway!

Ricardo
Tags
Grid
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Ricardo
Top achievements
Rank 1
Share this question
or