This is a migrated thread and some comments may be shown as answers.

Add Text box dynamically in groupHeaderSection

3 Answers 137 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
saravana
Top achievements
Rank 1
saravana asked on 17 Nov 2016, 11:31 AM

I would like to add in textboxes in Group Header section in the following format.

  Name   Rahul                Mobile No. 02323213                   State      TN

  Age       21                     Country     INDIA                          Senior   yes

  City     Chennai             Rin no          --------------

pls Help

 

 

             

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 17 Nov 2016, 04:16 PM
Hi saravana,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
saravana
Top achievements
Rank 1
answered on 22 Nov 2016, 04:08 PM

 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

 

 

0
Stef
Telerik team
answered on 23 Nov 2016, 05:25 PM
Hello saravana,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
saravana
Top achievements
Rank 1
Answers by
Stef
Telerik team
saravana
Top achievements
Rank 1
Share this question
or