HTML in the Satus Bar

8 posts, 2 answers
  1. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 13 Oct 2014 Link to this post

    Hi

    Is it possible to put html in the status bar.

    IE: sender.set_status("<strong>Boo</strong>");

    It would be nice to colour it red and centre text as a warning.

    Andy
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 13 Oct 2014 Link to this post

    Hello Andy,

    The status bar of the RadWindow is an input element and does not take HTML.

    What I can suggest is using jQuery to set the HTML you want. For example:

    var statusCell = $telerik.$(".rwStatusbar td", sender.get_popupElement()).first();
    statusCell.html("<strong>I am the desired bold text</strong>");



    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 13 Oct 2014 in reply to Marin Bratanov Link to this post

    Excellent, thank you Marin

    Andy
  5. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 14 Oct 2014 in reply to Marin Bratanov Link to this post

    Hi, One last question: how can I use positional information, any margin / padding / text align is ignored, but colour / weight is applied.

    Andy
  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 16 Oct 2014 Link to this post

    Hi Andy,

    On my end, padding seemed to work fine:

    <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" OnClientShow="OnClientShow"></telerik:RadWindow>
    <script type="text/javascript">
        function OnClientShow(sender, args) {
            var statusCell = $telerik.$(".rwStatusbar td", sender.get_popupElement()).first();
            statusCell.html("<strong style=\"padding-left: 50px;\">I am the desired bold text</strong>");
        }
    </script>

    I advise examining the resulting HTML in the dev toolbar of your browser to see what CSS rules apply to it so you can devise your own set accordingly.


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 16 Oct 2014 in reply to Marin Bratanov Link to this post

    I agree left padding does work, but top doesn't (I've had to use a couple of <br/>) and no matter what I try I can't get the text to centre. I cant rely on padding as I have this functionality on different sized pop ups.

    Andy
  8. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 20 Oct 2014 Link to this post

    Hello Andy,

    Have you tried something like this:

    statusCell.html("<div style=\"width: 100%; height: 100%;text-align: center; font-weight: bold;\">I am the desired bold text</div>");

    Also, not that the statusbar cell is only 18px tall, so having line breaks is not likely to work out nicely.

    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 12 Nov 2014 in reply to Marin Bratanov Link to this post

    Thank you Marin, this did the trick.

    Andy
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017