Hi, I want to set a TextBox auto-size.
I know it can be done by using Binding property and user function.
But I also need to serialize this report to xml.
Width.Value is readonly, so I cannot set it's width without using user function.
Is there any other way to do this?
You can do it with binding. In order the user function to work properly you have to deserialize the report from xml by using the report type that contains the user function. I have attached a sample project that has the functionality.
Kind regards,
Elian
the Telerik team
Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!
HI,
I am getting data dynamically and have to assign to textbox.My question is how to resize the texbox as per content in DB.
For example: data is 10 characters but that textbox holds 6 characters ,but when displaying it should show 10 characters .How to achieve this.
regards,
sateesh
0
Elian
Telerik team
answered on 21 Aug 2012, 07:06 PM
Hi Satish,
You can bind the Width property of the textbox to a user function which will calculate and return the size according to the input. This, however, will be a hard thing to accomplish because of the many factors which determine the text length, like font family, font size, font decoration, etc.
All the best,
Elian
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >