Client-Side New Item

3 posts, 0 answers
  1. Michael Constantine
    Michael Constantine avatar
    18 posts
    Member since:
    Jan 2006

    Posted 12 Mar 2010 Link to this post

    Can you tell me how to add a separator item client side?

    thanks!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Mar 2010 Link to this post

    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.

  3. Michael Constantine
    Michael Constantine avatar
    18 posts
    Member since:
    Jan 2006

    Posted 16 Mar 2010 Link to this post

    Thank You!

    I didn't see that method in the documentation:

    Michael
Back to Top