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

Hide empty textboxes at runtime

5 Answers 664 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mercell
Top achievements
Rank 2
Mercell asked on 22 Jul 2008, 08:25 AM
Hi,

I have a report with a lot of texboxes like this:

labelTextBox1    valueTextBox1
labelTextBox2    valueTextBox2
labelTextBox3    valueTextBox3
and so on...

If the value of a textbox is an empty string (or some other condition) I wan't to hide that textbox and the corresponding labelTextBox AND make the following labels and textboxes shift up filling the empty space.

Let's say valueTextBox2 is empty what I wan't it to like is this:

labelTextBox1    valueTextBox1
labelTextBox3    valueTextBox3

and NOT like this (with an empty line):

labelTextBox1    valueTextBox1

labelTextBox3    valueTextBox3

I just upgraded to version 2.5.8.519 from version 1.1.0.0 where this worked fine. How can I make this look like in version 1.1.0.0?

Thanks,
Brian

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 22 Jul 2008, 09:56 AM
Hi Bo,

You can review the following help articles that elaborate on the matter:
We do not recall making any changes in this functionality since v.1.x, can you explain how you've achieved this with the older version?

Regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mercell
Top achievements
Rank 2
answered on 23 Jul 2008, 07:58 AM
Hi Steve,

My problem was that I had to columns of labels/textboxes like this

labelTextBox1    valueTextBox1            labelTextBox4    valueTextBox4
labelTextBox2    valueTextBox2            labelTextBox5    valueTextBox5
labelTextBox3    valueTextBox3            labelTextBox6    valueTextBox6

Hiding labelTextBox2 and valueTextBox2 wouldn't make labelTextBox3 and valueTextBox3 move up because of the second column. I think I only had one column when using version 1.1.

I solved the problem by putting each column of labels/textboxes in a panel.

Don't know if this is a bug?!

Thanks,
Brian
0
Accepted
Steve
Telerik team
answered on 23 Jul 2008, 04:37 PM
Hi Bo,

This is not a bug, but the expected behavior. When you nest your items in a panel, basically they become a separate element of the report and the generic rules of the report apply to the panel directly instead of the report as a whole.

Kind regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Fim
Top achievements
Rank 1
answered on 01 Nov 2012, 05:11 PM
Hi,

I know this is an old post, but the links given here seem incorrect. It wil be a great help if the links were corrected.
0
Petio Petkov
Telerik team
answered on 05 Nov 2012, 07:49 PM
Hello Fim,

Here it is the correct url to the How do I 'shrink' TextBoxes that have no data? help article.
It seems that the second link doesn't exist anymore. In case you want to hide a control, my suggestion is to use Bindings to control the visible property.


Kind regards,
Petio Petkov
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Mercell
Top achievements
Rank 2
Answers by
Steve
Telerik team
Mercell
Top achievements
Rank 2
Fim
Top achievements
Rank 1
Petio Petkov
Telerik team
Share this question
or