CssClass ClientSide

3 posts, 0 answers
  1. Doug Beard
    Doug Beard avatar
    55 posts
    Member since:
    Sep 2009

    Posted 06 Oct 2009 Link to this post

    I need to query via javascript, what the CssClass is set to on a RadPane.  But, I can't find any exposed property to do so.  Is there a way to do this?  For now I'm using a value from a hidden input, but I'd rather be able to query the pane directly.
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 09 Oct 2009 Link to this post

    Hello Doug Beard,
    Yes, you are correct. The RadPane does not have a client property that sets/gets the CssClass applied to the pane. However, this CSS class is applied to the DIV element holding the content of the RadPane and you can get it the following way:
    <script type="text/javascript">
    function OnClientLoad(sender, args)
    {
        var pane = $find("<%= RadPane1.ClientID %>");
        var paneElement = pane.getContentElement();
        alert(paneElement.className);
    }
    </script>
    <telerik:RadSplitter ID="RadSplitter1" runat="server" OnClientLoad="OnClientLoad">
        <telerik:RadPane ID="RadPane1" runat="server" CssClass="Test">
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane2" runat="server">
        </telerik:RadPane>
    </telerik:RadSplitter>

    Regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug Beard
    Doug Beard avatar
    55 posts
    Member since:
    Sep 2009

    Posted 12 Oct 2009 Link to this post

    Works perfectly, thanks.
Back to Top