Hi,
I have searched all the document & demo, but no records about how to send costom para(argument) to event handler.
1. In jQuery, we could do this:
jQuery("#test").bind("keyup",{sendpara: thepara},function(event) {
alert(event.data.sendpara);
});
var editor = jQuery("#test").data("kendoEditor");
editor.bind("keyup",{sendpara: thepara},function(event) {
alert(event.data.sendpara);
});
2. I found this:
http://www.kendoui.com/forums/kendo-ui-framework/mvvm/passing-parameters-through-html-bindings-mvvm.aspx
it says we could:
var viewModel = kendo.observable({
Id: "users/1",
Points: 10,
ReducePoints: function(id) {
console.log(this.get("Id"));
}
});
jQuery("#test").kendoEditor({
sendpara:"123" });
var editor = jQuery("#test").data("kendoEditor");
editor.bind("change",function(event) {
alert("b:"+ this.get("sendpara") );
});
3. At last, I found this:
http://www.kendoui.com/forums/kendo-ui-web/numeric-textbox/get-element-id-from-change-event-handler.aspx
So I changed my code to:
jQuery("#test").kendoEditor();
var editor = jQuery("#test").data("kendoEditor");
editor.bind("change",function(event) {
alert("b:"+this.element.attr("sendpara") );
});
This is really not very good.
So the general question is this: where can I find documentation on the properties and methods of the event argument parameter?
Or kendoUI not really support to send para to an event handler?
If so, that's really a bad news, because it's very ordinary need to send some paras in to event handler, and to handle some ajax call or function to send this paras to the server, and so on.
yours,
Ivan