Ordered List styling

1 Answer 118 Views
Rendering Report Designer (standalone) Report Viewer - HTML5
Tim
Top achievements
Rank 1
Tim asked on 06 Aug 2022, 02:58 PM

I see that a feature was added in R3 2020 to support the styling of nested lists, https://feedback.telerik.com/reporting/1356704-ordered-list-styling

How would I implement this? I have letters that load dynamic HTML content like this:

<ol>
<li>Item one. </li>
<li>Item two.<ol>
<li>Item two a. <ol>
<li>Item two i.</li>
</ol>
</li>
</ol>
</li>
<li>Item 3.</li>
</ol>

I'd need it to render like this in the body of the letter:

1. Item one.
2. Item two.
    a. Item two a.
         i. Item tow i.
3. Item 3.

I'm adding an external style sheet when the letter is generated. 

ExternalStyleSheet(System.IO.File.OpenRead($"Reports\\ReportingStyleSheet.xml"));

I'm not sure how to add these styles.

ol li ol {
    list-style-type: lower-alpha;
}
ol li ol li ol{
    list-style-type: lower-roman;
}

ul li ul {
    list-style-type: circle;
}
ul li ul li ul {
    list-style-type: square;
}

 

Thanks.

Tim Paris

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 Aug 2022, 12:43 PM

Hi Tim,

The external stylesheets are applied only to the Report items, the HTML in the HtmlTextBox.Value will not be affected by any of the style rules present in the external stylesheet, I am afraid.

In order to use the custom list styles, they should be written inline the HTML via an attribute, for example:

<ol style="list-style-type: upper-roman">
  <li>Coffee</li>
  <li>Tea</li>
</ol>

Please let me know if you have any further questions.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
Rendering Report Designer (standalone) Report Viewer - HTML5
Asked by
Tim
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or