Hi Rahul Khinvasara,
Thank you for contacting us again.
Actually, the items with Visible
property set to false
does not occupy any space. I suppose you see columns of white space where the hidden items are, but that is because the rest of the items do not change their Width
. And that is the expected behavior.
If you want the visible items to span horizontally, you have to change their Size.Width
and change their Location.X
properties appropriately, after you hide the unwanted items.
Other solution is to add the textboxes dynamically at runtime on the right location and with appropriate size, based on the user input, instead of create all the columns at design time and then hide them.
If you have a report with Width reportWidth
, and you have to display columnCount
columns, then each column should look like reportWidth / columnCount
wide, and the Location.X
of the textboxes should be
( reportWidth / columnCount ) * 0
( reportWidth / columnCount ) * 1
( reportWidth / columnCount ) * 2
( reportWidth / columnCount ) * (columnCount - 1)
Please, have in mind to make the items a little bit narrower
, so that they do not overlap.
I hope this information helps. Do not hesitate to contact us if you need any further help.
the Telerik team