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

Client-Side New Item

2 Answers 41 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Michael Constantine
Top achievements
Rank 1
Michael Constantine asked on 12 Mar 2010, 11:36 PM
Can you tell me how to add a separator item client side?

thanks!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Mar 2010, 06:49 AM

Hello Michael,

You could use set_isSeparator(true) method in order to make the new RadComboBoxItem as sepeartor. Checkout the code shown below.

JavaScript:

 
    function addSeperator() {  
        var menu = $find('<%=RadMenu1.ClientID%>');  
        menu.trackChanges();  
        var item = new Telerik.Web.UI.RadMenuItem();  
        var parent = menu.findItemByText("Root RadMenuItem1"); // Get the menu item  
        item.set_isSeparator(true); // Set as seperator  
        parent.get_items().add(item); // Add the new item which is seperator  
        menu.commitChanges();   
    } 

Regards,

Shinu.

0
Michael Constantine
Top achievements
Rank 1
answered on 16 Mar 2010, 04:25 PM
Thank You!

I didn't see that method in the documentation:

Michael
Tags
Menu
Asked by
Michael Constantine
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Michael Constantine
Top achievements
Rank 1
Share this question
or