I have this funny situation in which I made a table row have 0 height so I could hide/show it dynamically. However now in designer I'd like to expand it so I can work with it.
Any tips?
2 Answers, 1 is accepted
0
Accepted
IvanY
Telerik team
answered on 25 Oct 2011, 01:49 PM
Hi Mihai Dinculescu,
You will not be able to "repair" your table in the Designer. However the code for the table row still exists, so you can modify it in the code behind file (MyReport.Designer.cs). The easiest way to do that is to press Ctrl + F and in the Find and Replace window to enter as search string 0D (in C# at least, might be 0 in VB.NET). The code that you search for looks like this (table1 is the name of your table):
Now you just have to substitute 0D with something meaningful, like 1D - this is just to make the row visible. When you go to the Designer your row will be visible and you will be able to edit it.
If you have set the Size of the first row to 0 the workaround will be more tricky - you have to find that piece of code:
this.table1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(6D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2D, Telerik.Reporting.Drawing.UnitType.Inch));
The second size (with green) is the size that you have to increment with 1. However this will not be enough to visualize the first row - you will have to find all the items in the first row and change their sizes as well; this is how the code looks for a textbox:
this.textBox1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
Change the size from 0D to 1D for all the items in the header and switch to the Designer - if you have missed an item the cell will be empty and when you try to make a column/row selection with that cell in it you will see the following message: "Cannot select a cell with no report item".