I have a report with a detail section that has a few html textboxes that have the value bound to a field. If that field is empty, I want the html textbox to shrink. I have CanShrink set to true. It works for regular textboxes. Am I missing something?
In the designer code I also set the visibility to false and the height and widths but it still keeps the report spaced out.
private void detail_ItemDataBound(object sender, EventArgs e)
{
Telerik.Reporting.Processing.DetailSection procDetail = sender as Telerik.Reporting.Processing.DetailSection;
Telerik.Reporting.Processing.HtmlTextBox txtSpecialTests = (Telerik.Reporting.Processing.HtmlTextBox)Telerik.Reporting.Processing.ElementTreeHelper.GetChildByName(procDetail, "txtSpecialTests");
if (txtSpecialTests != null)
{
if (txtSpecialTests.Value.ToString() == "")
{
txtSpecialTests.Visible = false;
txtSpecialTests.Height = new Unit(0);
txtSpecialTests.Width = new Unit(0);
}
}
}
Thanks,
Zack
In the designer code I also set the visibility to false and the height and widths but it still keeps the report spaced out.
private void detail_ItemDataBound(object sender, EventArgs e)
{
Telerik.Reporting.Processing.DetailSection procDetail = sender as Telerik.Reporting.Processing.DetailSection;
Telerik.Reporting.Processing.HtmlTextBox txtSpecialTests = (Telerik.Reporting.Processing.HtmlTextBox)Telerik.Reporting.Processing.ElementTreeHelper.GetChildByName(procDetail, "txtSpecialTests");
if (txtSpecialTests != null)
{
if (txtSpecialTests.Value.ToString() == "")
{
txtSpecialTests.Visible = false;
txtSpecialTests.Height = new Unit(0);
txtSpecialTests.Width = new Unit(0);
}
}
}
Thanks,
Zack