3 Answers, 1 is accepted
I believe the question is already discussed in your other forum thread - Dynamically add textboxes in telerik report group header section.
You can check the updates in all started by you forum threads after logging into your Telerik account.
Regards,
Stef
Telerik by Progress
Telerik.Reporting.Panel panel1 = new Telerik.Reporting.Panel();
Telerik.Reporting.TextBox txtbox;
Telerik.Reporting.TextBox txtbox1;
txtbox = new Telerik.Reporting.TextBox();
txtbox.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1, Telerik.Reporting.Drawing.UnitType.Cm));
txtbox.Name = "txtHead" + i.ToString();
txtbox.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.0, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.6, Telerik.Reporting.Drawing.UnitType.Cm));
txtbox.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
txtbox.StyleName = "Data";
txtbox.Value = "Patient Name";
txtbox1 = new Telerik.Reporting.TextBox();
txtbox1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(2, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1, Telerik.Reporting.Drawing.UnitType.Cm));
txtbox1.Name = "txtfield" + i.ToString();
txtbox1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(5.0, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.6, Telerik.Reporting.Drawing.UnitType.Cm));
txtbox1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
txtbox1.StyleName = "Data";
txtbox1.Value = "";
this.panel1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { txtbox, txtbox1 });
this code in header section
i want to access that text box and assing value in footer section
private void groupFooterSection_ItemDataBinding(object sender, EventArgs e)
{
var textbox = this.groupHeaderSection.Items[0].Items[0] as Telerik.Reporting.TextBox;
textbox.Value = "44444";
}
pls help
Items cannot be modified in events through their definitions - Changes on items in report events are not applied.
In general, reports are data-driven, which allows you to change an item's settings via conditional formatting, bindings and expression used as Value property, all based on the data fields.
Regards,
Stef
Telerik by Progress