Here is my situation, this might not be the best solution, but it almost works:
I have a master page with a radmenu in it. The menu item is a template item and in it I have a radajaxpanel (is this advised?). This menu item shows a folder structure that i created along with a text box that lets you type ahead to filter the folders that show in the menu updating the radajaxpanel. This works great on most pages, however, on pages where the child page contains a rad grid, the rad grids PreRender method keeps getting called which dramatically slows down the type ahead. Who is calling the PreRender method? Any ideas on how to track that down. I put break points everywhere but it just keeps going into PreRender and I can't tell why it goes in there. It never calls the NeedDataSource method.
This is in the RadCodeBlock
Code Behind of master page
LoadTreePanel ends with this
Anything here that would cause the child page to fire the RadGrid's PreRender
I have a master page with a radmenu in it. The menu item is a template item and in it I have a radajaxpanel (is this advised?). This menu item shows a folder structure that i created along with a text box that lets you type ahead to filter the folders that show in the menu updating the radajaxpanel. This works great on most pages, however, on pages where the child page contains a rad grid, the rad grids PreRender method keeps getting called which dramatically slows down the type ahead. Who is calling the PreRender method? Any ideas on how to track that down. I put break points everywhere but it just keeps going into PreRender and I can't tell why it goes in there. It never calls the NeedDataSource method.
This is in the RadCodeBlock
function SearchFolders() { |
var tb = $get('<%=RadMenu1.Items[0].Items[0].FindControl("FolderSearchPhrase").ClientID%>'); |
if (tb.value == "") { |
//var ajaxMgr = $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>"); |
//ajaxMgr.ajaxRequest("ResetTree"); |
var ajaxPanel = $find('<%=RadMenu1.Items[0].Items[0].FindControl("RadAjaxPanel1").ClientID %>'); |
ajaxPanel.ajaxRequest("ResetTree"); |
} |
else { |
//var ajaxMgr = $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>"); |
//ajaxMgr.ajaxRequest("SearchFolders"); |
var ajaxPanel = $find('<%=RadMenu1.Items[0].Items[0].FindControl("RadAjaxPanel1").ClientID %>'); |
ajaxPanel.ajaxRequest("SearchFolders"); |
} |
} |
Code Behind of master page
protected void PanelRequest(object sender, AjaxRequestEventArgs e) |
{ |
if (e.Argument == "ResetTree") |
{ |
thisUser = new User(2); |
Folder f = new Folder(); |
if (Request.QueryString["folderid"] == null || Request.QueryString["folderid"] == "") |
{ |
f.FolderID = 0; |
} |
else |
{ |
f.FolderID = Convert.ToInt32(Request.QueryString["folderid"]); |
} |
FolderList fl = new FolderList(thisUser, f, thisUser); |
Session["FolderList"] = fl; |
HiddenField TreePageNum = (HiddenField)RadMenu1.Items[0].Items[0].FindControl("TreePageNum"); |
TreePageNum.Value = "1"; |
m_Pagenum = Convert.ToInt32(TreePageNum.Value); |
LoadTreePanel(); |
} |
else if (e.Argument == "SearchFolders") |
{ |
thisUser = new User(2); |
TextBox searchPhrase = (TextBox)RadMenu1.Items[0].Items[0].FindControl("FolderSearchPhrase"); |
FolderList fl; |
if (searchPhrase.Text.Trim().Length == 0) |
{ |
Folder f = new Folder(); |
if (Request.QueryString["folderid"] == null || Request.QueryString["folderid"] == "") |
{ |
f.FolderID = 0; |
} |
else |
{ |
f.FolderID = Convert.ToInt32(Request.QueryString["folderid"]); |
} |
fl = new FolderList(thisUser, f, thisUser); |
} |
else |
{ |
fl = new FolderList(thisUser, searchPhrase.Text); |
} |
Session["FolderList"] = fl; |
HiddenField TreePageNum = (HiddenField)RadMenu1.Items[0].Items[0].FindControl("TreePageNum"); |
TreePageNum.Value = "1"; |
m_Pagenum = Convert.ToInt32(TreePageNum.Value); |
LoadTreePanel(); |
} |
} |
LoadTreePanel ends with this
Panel TreePanel = (Panel)RadMenu1.Items[0].Items[0].FindControl("TreePanel"); |
TreePanel.Controls.Clear(); |
TreePanel.Controls.Add(new LiteralControl(html.ToString())); |
Anything here that would cause the child page to fire the RadGrid's PreRender