5 Answers, 1 is accepted
As per your code it will only fire "alert hi 2".
Because Firstly you have assigned "alert hi 1" then you have overwrite this with "alert hi 2". so it will fired only "alert hi 2".
Thanks.
Jayesh Goyani
So how can multiple events be assigned to DataBound and fire using the example
.Events(e => e
.DataBound("alert('hi 1 ')")
.DataBound("alert('hi 2')")
);
Hello jeff,
Multiple DataBound events for same grid is not supported scenario. I would suggest to use one event handler and implement some conditional statement to check and execute the desired code.
Regards,Boyan Dimitrov
Telerik
HI Jeff,
For
.Events(e => e
.DataBound("alert('hi 1 ')")
.DataBound("alert('hi 2')")
);
I ran into the same problem and I solved it like this. The both functions will be executed.
.Events(a => a.DataBound(@<text>function(e){ function1(); function2(); }</text>))
In Scripts(same page.cshtml):
function function1(){
alert('hi 1 ');
}
function function2(){
alert('hi 2 ');
}
Thank you for sharing a solution with the Kendo UI community.
This is highly appreciated.
Regards,
Stefan
Telerik by Progress