HI,
First, sorry for my english google translator.
My problem is that I'm trying to set the visibility of a subreport this by DataBinding. Except that Telerik is not updating the fields that I'm by setting the visibility, they still visible. I tried other ways, but then when I exchange their visibility to false when returns to be true, the interface fields do not return true.
Here is a piece of my code to see if you can help me.
I'm have a List
First, sorry for my english google translator.
My problem is that I'm trying to set the visibility of a subreport this by DataBinding. Except that Telerik is not updating the fields that I'm by setting the visibility, they still visible. I tried other ways, but then when I exchange their visibility to false when returns to be true, the interface fields do not return true.
Here is a piece of my code to see if you can help me.
I'm have a List
C#
I have the list, and I want the subreport becomes invisible when the list is empty.
detail is the name of the group that want to become invisible
private void subReport1_ItemDataBinding_1(object sender, EventArgs e)
{
var table = sender as Telerik.Reporting.Processing.SubReport;
if (table == null) return;
var group = table.DataObject.RawData as CommissionPaymentValue;
if (group == null) return;
var items = group.CommissionPaymentValueItem;
detail.Visible = items.Count > 0;
this.commissionPaymentValueItemReport1.Report.DataSource = items.OrderByDescending(a => a.TypeItem);
}
I know there are threads with the same problems, but still could not solve my.
att Lucas