Disabling expression calculations on a TextBox

1 Answer 28 Views
.NET Framework Expressions Programming
Niklas
Top achievements
Rank 1
Iron
Niklas asked on 10 Jan 2024, 09:36 AM

Hello,

can I disable Expressions on a TextBox? I am using Telerik Reporting in a C# Project.

I have a TextBox in my Report that has its value set to a string in the Reports code. If the string starts with an "=", the entire string is treated as an expression and is calculated in the rendered Report. Is there a way to display the raw text in the Report TextBox with a "=" at the start and without any calculations applied?

Addind Quotation marks to the string in C# code does not seem to work, as it now adds these Quotation marks to the rendered TextBox.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Niklas
Top achievements
Rank 1
Iron
answered on 11 Jan 2024, 07:53 AM

I have found a workaround.

I wrapped the string in an additional Equals sign and Quotation marks.

Tags
.NET Framework Expressions Programming
Asked by
Niklas
Top achievements
Rank 1
Iron
Answers by
Niklas
Top achievements
Rank 1
Iron
Share this question
or