Dec 13, 2012, 12:23 PM
Last edited by ViDom; Dec 14, 2012 at 9:33 AM.
X.Js.AddScript("script");
Or define a JavaScript function and call it this way:X.Js.Call("reloadComboBoxAndSetValue", combo.ClientID, "value");
var reloadComboBoxAndSetValue = function() {
var combo = parent.ComboBox1;
combo.getStore().reload({
callback: function () {
combo.setValue('value');
}
});
}
And then instead of this Server code:Store store = this.ComboBox1.GetStore();
store.AddListener("load", string.Format("function () {{ {0}.setValue('{1}'); }}", this.ComboBox1.ClientID, "value"), null, new HandlerConfig() { Single = true });
store.Call("reload");
X.Js.Call("reloadComboBoxAndSetValue", combo.ClientID, "value");
X.Js.Call("reloadComboBoxAndSetValue", combo.ClientID, "value");
on button inside iframe? And this Js function should be added in my serverControl prerender event or where?
X.Js.AddScript("script");
And yes, you should call it from the Button's Click DirectEvent handler.