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

Enable/Disable AjaxPanel To ContextMenu Items

1 Answer 53 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Suresh K
Top achievements
Rank 1
Suresh K asked on 30 Nov 2009, 12:40 PM
hi.
i have contextmenu with Three items.
I want to Disable the Ajax to 1 and 2 item(s), i want to enable ajax only to 0th item.
0-ViewDetails
1.Audio Download
2.Document Download
<telerik:RadContextMenu ID="RadCDMenu" runat="server" Skin="Hay" Style="position: static" Enabled="False" > 
            <Items> 
                <telerik:RadMenuItem runat="server" Text="View Details"
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" Text="Audio Download"
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" Text="Document Download"
                </telerik:RadMenuItem> 
            </Items> 
        </telerik:RadContextMenu> 



can any one help me how to do this .
i did code like this in Page_Load.

  If RadCDMenu.Items(0).Selected = False Then
            RadScriptManager1.RegisterPostBackControl(RadCDMenu)
  End If
but,it's not working properly.once i disable the ajax i can't able to Enable it.
Here i have to Refresh the page, then only i am getting ajax Enable .

can any one Help Me please....

Thank You
Suresh K

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Dec 2009, 09:38 AM
Hello Suresh,

Try disable the Ajax in the OnRequestStart client side method of the Ajax Panel based on which menu item was clicked: Check out teh section 'Disable AJAX for the current request' under the following help document:
Exclude controls from ajaxifying

Hope this suggestion helps..
-Princy.
Tags
Menu
Asked by
Suresh K
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or