Why I cant change object property at runtime
I'm using a treeview control on VS.As the code below.textobject "villageName"s text havnt changed.
protected void RegionsTree_SelectedNodeChanged(object sender, EventArgs e)
{
FDisclosureReport.ReportDataSources = "VoucherDataSource;BalanceDataSource";
FastReport.TextObject villageName = FDisclosureReport.Report.FindObject("villageName") as FastReport.TextObject;
villageName.Text = RegionsTree.SelectedNode.Text;
FDisclosureReport.DataBind();
FDisclosureReport.Refresh();
}
Comments
The code is correct. Probably the report is not refreshed propertly when you call the FDisclosureReport.Refresh(). Probably you load the report file in this method? In this case, the villageName is loaded from a file and loses your settings.
It works.But that mean I cant control it in another event like selectedNodeChanged in Treeview. and DataBind() refresh()[makes endless loop] cant stay in it.it's somewhat inconvenient.