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

[Solved] Subscribing grid client events from javascript

3 Answers 137 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.
Daní
Top achievements
Rank 1
Daní asked on 15 Nov 2011, 01:40 AM
Hi,

I'm new in MVC development. Is there any way to subscribe grid client events from javascript code?

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 Nov 2011, 09:38 AM
Hi DanĂ­,

You may attach to most of grid client  events through its DOM element using jQuery bind function:

$("#Grid").bind("dataBinding", function() { doSomething(); })


Regards,
Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Daní
Top achievements
Rank 1
answered on 15 Nov 2011, 11:54 AM
Hi Rosen
Is rowDataBound event one of these events? I'm using Grid with ajax databinding and I have something silmilar to this:
$("#Grid").bind("rowDataBound", function(e) {alert(e); });
$("#Grid").data("tGrid").rebind();

I can't see any alert message and grid has two rows.
0
Rosen
Telerik team
answered on 15 Nov 2011, 12:40 PM
Hello DanĂ­,

I'm afraid not, RowDataBound is special event to which handler can be attached only server-side. This limitation is imposed for performance optimization of grid's client rendering.

All the best,
Rosen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Daní
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Daní
Top achievements
Rank 1
Share this question
or