This is a migrated thread and some comments may be shown as answers.

RadContextMenu + Loading Panel

1 Answer 87 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
SamVanity
Top achievements
Rank 2
SamVanity asked on 09 Aug 2008, 02:00 AM
Hi,

I have a RadContextMenu that is defined dynamically on the client side for many controls on a page.

When the context menu item posts back, I would like to show a loadingpanel on the context menu. I don't seem to be able to do this.

If you have any suggestion, let me know.

1 Answer, 1 is accepted

Sort by
0
Kevin Babcock
Top achievements
Rank 1
answered on 10 Aug 2008, 04:55 AM
Hello Sam,

You can not use the RadAjaxLoadingPanel control with the RadContextMenu control (without some complex JavaScript to enable/disable the loading panel and position it correctly). However, you can use the built-in LoadingStatusTemplate to get the same functionality. Simply add the same image you wanted to use in the RadAjaxLoadingPanel to the LoadingStatusTemplate and that image will display until the menu items are loaded. Here is a quick example:

<telerik:RadContextMenu ID="RadContextMenu1" runat="server"
    <Targets> 
        <telerik:ContextMenuControlTarget ControlID="RadGrid1" /> 
    </Targets> 
    <DataBindings> 
        <telerik:RadMenuItemBinding TextField="Text" ValueField="Value"/> 
    </DataBindings> 
    <WebServiceSettings Method="GetMenuItems" Path="RadContextMenuService.asmx" /> 
    <Items> 
        <telerik:RadMenuItem Text="Menu" ExpandMode="WebService" /> 
    </Items> 
    <LoadingStatusTemplate> 
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                style="border: 0px;" /> 
    </LoadingStatusTemplate> 
</telerik:RadContextMenu> 


I hopet his helps. Please let me know if you have any further questions.

Sincerely,
Kevin Babcock
Tags
Ajax
Asked by
SamVanity
Top achievements
Rank 2
Answers by
Kevin Babcock
Top achievements
Rank 1
Share this question
or