Hi!!
I need to change the text value of a Text component in run time mode. I tried a lot ways to do it, but no success.
None of ways below works:
SistemaConsorcio si = new SistemaConsorcio();
((Stimulsoft.Report.Components.StiText)si.GetComponentByName("lblReportConsorcio")).Text = "System";
si.lblReportConsorcio.Text.Value = "System";
si.lblReportConsorcio.TextValue = "System";
Thank you for your help!!!
Change the StiText Component value
Re: Change the StiText Component value
Hello.
Here is a sample code how to change text value at runtime:
Other way is to add a variable, use the variable in text component and change value of the variable at runtime.
Thank you.
Here is a sample code how to change text value at runtime:
Code: Select all
StiText txt = report.GetComponentByName("Text1") as StiText;
txt.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(txt_GetValue);
...
void txt_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
e.Value = "System";
}
Thank you.