This question is locked. New answers and comments are not allowed.
Alexandre Jobin
Top achievements
Rank 1
Alexandre Jobin
asked on 14 Jun 2010, 09:24 PM
hi!
my grid is in 'server' mode and i would like to make some adjustement with jQuery at the load of the page. The problem is that if i put my code in the $(document).ready function, the grid is not yet ready to play with him. For example, the $("#grid").data("tGrid") is not there, etc...
is there a way to do it properly?
alex
my grid is in 'server' mode and i would like to make some adjustement with jQuery at the load of the page. The problem is that if i put my code in the $(document).ready function, the grid is not yet ready to play with him. For example, the $("#grid").data("tGrid") is not there, etc...
is there a way to do it properly?
alex
5 Answers, 1 is accepted
0
Accepted
Hi Alexandre Jobin,
You can use the OnLoad client event for that. It fires when the grid is initialized.
Regards,
Atanas Korchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
You can use the OnLoad client event for that. It fires when the grid is initialized.
Regards,
Atanas Korchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
0
Alexandre Jobin
Top achievements
Rank 1
answered on 15 Jun 2010, 02:31 PM
great!
thank you
alex
thank you
alex
0
Alexandre Jobin
Top achievements
Rank 1
answered on 15 Jun 2010, 02:39 PM
i just have a little problem!
on the onLoad event, this command return 'undefined':
$("#grid").data("tGrid")
but if i wait for the full load of the page, i will have access to it.
is it normal?
alex
on the onLoad event, this command return 'undefined':
$("#grid").data("tGrid")
but if i wait for the full load of the page, i will have access to it.
is it normal?
alex
0
Hi Alexandre Jobin,
This is a known limitation. To work it around use setTimeout:
function onLoad () {
setTimeout(function() {
var grid = $("#grid").data("tGrid")
}, 100)
}
We will fix that in the next major release.
Regards,
Atanas Korchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
This is a known limitation. To work it around use setTimeout:
function onLoad () {
setTimeout(function() {
var grid = $("#grid").data("tGrid")
}, 100)
}
We will fix that in the next major release.
Regards,
Atanas Korchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
0
Alexandre Jobin
Top achievements
Rank 1
answered on 15 Jun 2010, 03:40 PM
thank you for the info!