Hello, I have a webpart with three rad grid controls, I'm unable to get the radAjaxManager to work. I've added the following code OnInit
and the following in the OnLoad Event
I've added the grid controls and the ajax panel to the page in the CreateChildControls().
am I missing something?
thank you,
Phani
| protected override void OnInit(EventArgs e) |
| { |
| base.OnInit(e); |
| Page.ClientScript.RegisterStartupScript(typeof(ProjectSearchBuilder), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true); |
| if (this.Page.Form != null) |
| { |
| string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"]; |
| if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();") |
| { |
| this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();"; |
| } |
| } |
| ScriptManager scriptManager = ScriptManager.GetCurrent(Page); |
| if (scriptManager == null) |
| { |
| scriptManager = new RadScriptManager(); |
| Page.Form.Controls.Add(scriptManager); |
| } |
| EnsureChildControls(); |
| } |
and the following in the OnLoad Event
| protected override void OnLoad(EventArgs e) |
| { |
| base.OnLoad(e); |
| ((RadAjaxManager)FindControl("RadAjaxManager1")).AjaxSettings.AddAjaxSetting(FindControl("_btnSearch"), FindControl("ProjectGrid")); |
| ((RadAjaxManager)FindControl("RadAjaxManager1")).AjaxSettings.AddAjaxSetting(FindControl("_btnSearch"), FindControl("RadGrid2")); |
| ((RadAjaxManager)FindControl("RadAjaxManager1")).AjaxSettings.AddAjaxSetting(FindControl("_btnSearch"), FindControl("RadGrid3")); |
| } |
am I missing something?
thank you,
Phani