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

HTML in the Satus Bar

7 Answers 18 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 2
Andy Green asked on 13 Oct 2014, 11:32 AM
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

7 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 13 Oct 2014, 12:30 PM

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.

 
0
Andy Green
Top achievements
Rank 2
answered on 13 Oct 2014, 02:22 PM
Excellent, thank you Marin

Andy
0
Andy Green
Top achievements
Rank 2
answered on 14 Oct 2014, 02:39 PM
Hi, One last question: how can I use positional information, any margin / padding / text align is ignored, but colour / weight is applied.

Andy
0
Marin Bratanov
Telerik team
answered on 16 Oct 2014, 01:06 PM

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.

 
0
Andy Green
Top achievements
Rank 2
answered on 16 Oct 2014, 01:50 PM
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
0
Accepted
Marin Bratanov
Telerik team
answered on 20 Oct 2014, 11:56 AM

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.

 
0
Andy Green
Top achievements
Rank 2
answered on 12 Nov 2014, 10:47 AM
Thank you Marin, this did the trick.

Andy
Tags
Window
Asked by
Andy Green
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Andy Green
Top achievements
Rank 2
Share this question
or