Hi all,
I have a user control that contains a RadAjaxManagerProxy configured thus:
<
telerik:RadAjaxManagerProxy
ID
=
"radajaxmanagerproxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"linkRefreshCCCLogos"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rCCCLogos"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
I have a repeater that is to be refreshed when a record is edited via RadWindow, which in turn triggers a postback OnClientClose against a hidden linkbutton: (refreshPage is the function I've assigned to OnClientClose, and it does get called and passes the correct argument to refreshBrandingOptions)...
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
language
=
"javascript"
type
=
"text/javascript"
>
function refreshPage(sender, args) {
if (args.get_argument() != null) {
refreshBrandingOptions(args.get_argument());
} else { }
}
function refreshBrandingOptions(ElementTypeID) {
switch (ElementTypeID) {
case 52:
// __doPostBack('linkRefreshCCCLogos', '');
break;
case 1:
__doPostBack('linkRefreshAssets', '');
break;
default:
alert('Trying to refresh for ElementTypeID: ' + ElementTypeID);
//Do nothing
}
}
</
script
>
</
telerik:RadScriptBlock
>
If the OnClientClose function is called and triggers the postback, the whole page refreshes.
If I add some dummy text to the linkbutton, stop the OnClientClose event from firing and then manually click the linkbutton, the repeater updates via ajax as it should.
The linkbutton and repeater code:
<
asp:LinkButton
ID
=
"linkRefreshCCCLogos"
runat
=
"server"
Text
=
"dddd"
></
asp:LinkButton
>
<
div
class
=
"titleDiv"
style
=
"padding-left: 24px;"
>
<
asp:Repeater
ID
=
"rCCCLogos"
runat
=
"server"
>
<
HeaderTemplate
>
<
div
style
=
"height: 10px;"
>
</
div
>
<
div
class
=
"defaultText"
style
=
"width: 100px; display: inline-block; font-weight: bold;"
>
Process</
div
>
<
div
class
=
"defaultText"
style
=
"width: 180px; display: inline-block; font-weight: bold;"
>
Asset Name</
div
>
<
div
class
=
"defaultText"
style
=
"width: 140px; display: inline-block; font-weight: bold;"
>
Position</
div
>
<
div
class
=
"defaultText"
style
=
"width: 120px; display: inline-block; font-weight: bold;"
>
Size</
div
>
<
div
class
=
"defaultText"
style
=
"width: 170px; display: inline-block; font-weight: bold;"
>
Colour</
div
>
<
div
class
=
"defaultText"
style
=
"width: 170px; display: inline-block; font-weight: bold;"
>
Colour 2</
div
>
<
div
class
=
"defaultText"
style
=
"width: 16px; display: inline-block;"
>
</
div
>
<
div
class
=
"defaultText"
style
=
"width: 16px; display: inline-block;"
>
</
div
>
<
br
/>
</
HeaderTemplate
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblOrderGarmentBrandingID"
runat
=
"server"
Visible
=
"false"
Text=' <%# DataBinder.Eval(Container.DataItem, "OrderGarmentBrandingID")%>'></
asp:Label
>
<
div
class
=
"defaultText"
style
=
"width: 100px; display: inline-block;"
>
<%# DataBinder.Eval(Container.DataItem, "ProcessName")%></
div
>
<
div
class
=
"defaultText"
style
=
"width: 180px; display: inline-block;"
>
<%# DataBinder.Eval(Container.DataItem, "AssetName")%></
div
>
<
div
class
=
"defaultText"
style
=
"width: 140px; display: inline-block;"
>
<%# DataBinder.Eval(Container.DataItem, "PositionName")%></
div
>
<
div
class
=
"defaultText"
style
=
"width: 120px; display: inline-block;"
>
<%# DataBinder.Eval(Container.DataItem, "SizeName")%></
div
>
<
div
class
=
"defaultText"
style
=
"width: 170px; display: inline-block;"
>
<%# DataBinder.Eval(Container.DataItem, "Colour1Name")%></
div
>
<
div
class
=
"defaultText"
style
=
"width: 170px; display: inline-block;"
>
<%# DataBinder.Eval(Container.DataItem, "Colour2Name")%></
div
>
<
div
class
=
"defaultText"
style
=
"width: 16px; display: inline-block; padding-left: 10px;"
>
<
asp:ImageButton
ID
=
"btnEditOption"
runat
=
"server"
ImageUrl
=
"/assets/images/application/icons/small/edit.gif"
ImageAlign
=
"Bottom"
/></
div
>
<
div
class
=
"defaultText"
style
=
"width: 16px; display: inline-block; padding-left: 10px;"
>
<
asp:ImageButton
ID
=
"btnDeleteCCCLogoOption"
runat
=
"server"
ImageUrl
=
"/assets/images/application/icons/small/delete.gif"
ImageAlign
=
"Bottom"
/></
div
>
<
div
style
=
"width: 970px; border-top: 1px dotted #ccc;"
>
</
div
>
</
ItemTemplate
>
</
asp:Repeater
>
</
div
>
Can anyone shed some light on what's going on here?
Cheers
Rich