Is there any known issues with calling RadAjaxManager ajaxRequest from within SharePoint? Are there any settings/variable I should check in the SharePoint masterpage?
I have a combobox with AllowCustomText = True. When the user presses enter, I call ajaxRequest to update a grid on the screen. The problem is it only works 1 time. After the first time, ajaxRequest gets called, but the loading panel does not show, and the grid does not update. I added alerts to make sure that the AjaxManager is found in the javascript, and ajaxRequest calls with no error. I have set up the same senario in a simple web project, and it works fine. But when I use it on a page in SharePoint, the issue exists.
Here is my code:
Any help would be appreciated.
Thanks,
Justin
I have a combobox with AllowCustomText = True. When the user presses enter, I call ajaxRequest to update a grid on the screen. The problem is it only works 1 time. After the first time, ajaxRequest gets called, but the loading panel does not show, and the grid does not update. I added alerts to make sure that the AjaxManager is found in the javascript, and ajaxRequest calls with no error. I have set up the same senario in a simple web project, and it works fine. But when I use it on a page in SharePoint, the issue exists.
Here is my code:
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
OnAjaxRequest
=
"RadAjaxManager1_AjaxRequest"
RequestQueueSize
=
"3"
/>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Telerik"
/>
<
telerik:RadComboBox
ID
=
"cmbSearch"
runat
=
"server"
Width
=
"220px"
AllowCustomText
=
"True"
>
<
ItemTemplate
>
<
telerik:RadGrid
ID
=
"grdSearch"
Width
=
"530px"
runat
=
"server"
OnNeedDataSource
=
"grdSearch_NeedDataSource"
>
...
</
telerik:RadGrid
>
</
ItemTemplate
>
<
Items
>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
" "
></
telerik:RadComboBoxItem
>
</
Items
>
</
telerik:RadComboBox
>
protected void Page_Load(object sender, EventArgs e)
{
RadGrid grid = cmbSearch.Items[0].FindControl("grdSearch") as RadGrid;
RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, grid, RadAjaxLoadingPanel1);
}
<
telerik:RadCodeBlock
ID
=
"rcb1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
window.onload = RegisterSearchEvent;
function RegisterSearchEvent() {
var combo = $find("<%= cmbSearch.ClientID %>");
var input = combo.get_inputDomElement();
input.attachEvent("onkeydown", searchBoxKeyDown);
}
function searchBoxKeyDown(e)
{
if (!e)
e = window.event;
var code = e.keyCode;
if (code == 13)
{
var combo = $find("<%= cmbSearch.ClientID %>");
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadFilteredData");
}
e.cancelBubble = true;
if (e.stopPropagation)
{
e.stopPropagation();
}
return false;
}
}
</
script
>
</
telerik:RadCodeBlock
>
Any help would be appreciated.
Thanks,
Justin