Inserting conditional expression diagonal into telerik report textbox data

1 Answer 13 Views
.NET Core Rendering
주호
Top achievements
Rank 1
주호 asked on 25 Oct 2023, 12:10 PM

I am making a telerik report

However, I want to display a diagonal line in the textbox when a specific value comes in.

I want it to be displayed like this.


this.textBox10.Name = "textBox10"; this.textBox10.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Cm(1.5D), Telerik.Reporting.Drawing.Unit.Cm(0.5D)); this.textBox10.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center; this.textBox10.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle; this.textBox10.StyleName = "Aspect.TableBody"; this.textBox10.Value = "= IIf(Fields.Name = 'Day', ' ', Fields.Name)";


I wrote the code like this, and first of all, if the data is Day, it is treated as blank, but when the data is Day, I want to display it like an image

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 30 Oct 2023, 08:44 AM

Hi 주호,

You may use the property BackgroundImage of the TextBox to display the line. It may be changed with Bindings or Conditional Formatting.

For details, you may check the KB article How to Change a Report's Background Image through Binding.

Regards,
Todor
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Tags
.NET Core Rendering
Asked by
주호
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or