SplitButton Collapse function ??

9 posts, 2 answers
  1. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 22 Jul 2010 Link to this post

    I didn't see a collapse or expand function for the SplitButton. When I click on the SplitButton the list expand so I can chose an item, but it stay like that until I click one. If the user decide to not click anything it is most likely that he will expect to continue what he was doing on the page and that the SplitButton will then collapse by himself. Is there a way to acheive this behavior?

    Thanks,
    Sébastien
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 23 Jul 2010 Link to this post

    Hi Sébastien,

    The split button is supposed to collapse when it loses focus, so if you click the button, the dropdown opens and then if you click anywhere on the page -  it is closed - this is the default behavior.

    Greetings,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 23 Jul 2010 Link to this post

    I checked that out and it seems that it is working as expected, except when I click inside a radPane that has is contentUrl set to something. I'll try to isolate this behavior in smaller project.
  5. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 23 Jul 2010 Link to this post

    It is what I tougth, the splitButton don't collapse when we click inside a radPane that have his contentUrl set. There is the project I used to recreate the problem :

    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div style="height:100%">
            <telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Sitefinity" Width="100%">
                <Items>
                    <telerik:RadToolBarButton runat="server" Text="Button 0">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarSplitButton runat="server" Text="SplitButton 0">
                        <Buttons>
                            <telerik:RadToolBarButton runat="server" Text="Child Button 1">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Child Button 2">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Child Button 3">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Child Button 4">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Child Button 5">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Child Button 6">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Child Button 7">
                            </telerik:RadToolBarButton>
                        </Buttons>
                    </telerik:RadToolBarSplitButton>
                    <telerik:RadToolBarButton runat="server" Text="Button 3">
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
            <telerik:RadSplitter ID="RadSplitter1" Runat="server" Orientation="Horizontal"
            Skin="Sitefinity" Height="100%" HeightOffset="45" Width="100%">
            <telerik:RadPane ID="RadPane1" Runat="server" Height="50%" ContentUrl="http://www.telerik.com">
                 
            </telerik:RadPane>
            <telerik:RadSplitBar ID="RadSplitBar1" Runat="server">
            </telerik:RadSplitBar>
            <telerik:RadPane ID="RadPane2" Runat="server" Height="50%">
                <label>elkf hsafgjks hagkfd hasgkfdsgj fkdjs hgk</label>
            </telerik:RadPane>
             
        </telerik:RadSplitter>
        </div>
         
        </form>
    </body>

    If you expand the SplitButton and then decide to continue navigating on the telerik website the SplitButton won't collapse. Because my project his mostly composed of a toolBar and a radPane with the contentUrl set, this behavior is pretty anoying so I would take any idea you have to correct this. At first at wanted to used a collapse() function in a event like mouseover of the radPane iframe but as my post point out, I can't seem to find any function doing that.
  6. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 29 Jul 2010 Link to this post

    Hello Sébastien,

    Actually this is expected behavior as the radpane contains a new page in an iframe and the current page cannot handle  the click events in this page.  The correct function to collapse the splitbutton is called hideDropDown():

    var splitbutton = $find("RadToolBar1").get_items().getItem(1);
    if(splitbutton._isDropDownVisible == "true")   
        splitbutton.hideDropDown();

    Best regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 29 Jul 2010 Link to this post

    Ha Thank you for that, I can now start to implement something! This function doesn't seem to be listed anywhere though. It maybe interesting to add it in the help for the radToolbar.

    Thanks,
    Sébastien
  8. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 29 Jul 2010 Link to this post

    Hi Sébastien,

    You are right that it's missing in the help, we'll add it. Thanks

    Regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Sébastien
    Sébastien avatar
    55 posts
    Member since:
    Jun 2010

    Posted 29 Jul 2010 Link to this post

    I have finally been able to implement a show on mouseOver and an hide on mouseOut. Anyone looking for something like this might want to look HERE.

    Question for telerik : Does the item have a way to access it's parent item? If so what is the function/property?
  10. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 04 Aug 2010 Link to this post

    Hello Sébastien,

    You can use get_parent() method for this.

    Kind regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017