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

Adjust TextBox Location to Fill White Space

2 Answers 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 02 Mar 2018, 11:36 PM

I have 4 textboxes that correspond to a multi-select dropdown parameter.  The space for the textboxes is a set width on my report.  Depending on which options you choose from the parameter dropdown, the other textboxes visibility will toggle on and off.  I have also set the width of the text boxes to change depending on how many are selected (if 2 options are selected, each is 1/2 of the given space.  If 3 are selected, each will be 1/3 of the space.

My problem now is I need to set the location of the textboxes depending on what is chosen.  If the first and third text box are shown and the second and fourth are hidden, the first and third will each be half of the space.  BUT I would need the third box to scoot over against the first.  Now, it stays at its original location and creates whitespace, causing the 3rd box to go onto a second page.

box1 box2 box3 box4

box1_____box3____

Is there a way to make box 3 move to the left up against box1 if box 2 is hidden?

 

Thanks,

Phillip

2 Answers, 1 is accepted

Sort by
0
Phil
Top achievements
Rank 1
answered on 18 Apr 2018, 08:18 PM

Any news??  

Maybe if I could access the selected values within my multi-valued parameter at run time it would help.  

if report.ReportParameters["FactorLeaders"].Value.Contains(1)

  { true };

else

  { false };

I need something like this... where I can check which values the user has selected and move/hide certain textboxes...

Is this doable?  How to I access the values of the mulivalued parameter?  what if more than one value is selected?

thanks,

Phillip

 

     

0
Accepted
Katia
Telerik team
answered on 23 Apr 2018, 12:32 PM
Hi Phillip,

Positions of report items will change when some of the items are hidden based on the rules described in https://docs.telerik.com/reporting/designing-reports-design-considerations-report-layout#visibility.

In case there are items under/above the TextBoxes, the renderer will maintain the vertical space between those items and textBox3 which will prevent textBox3 from moving to the left.

Solution can be to place all textBoxes inside a Panel item. This way the items that are under/below will not affect the position of the items inside the panel.


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Phil
Top achievements
Rank 1
Answers by
Phil
Top achievements
Rank 1
Katia
Telerik team
Share this question
or