ActiveReports 9
Insert Method (ControlCollection)
Example 

Index to which the control should be inserted.
Control to be inserted.
Inserts the control specified in the value parameter at the specified index.
Syntax
'Declaration
 
Public Sub Insert( _
   ByVal index As System.Integer, _
   ByVal control As ARControl _
) 
public void Insert( 
   System.int index,
   ARControl control
)

Parameters

index
Index to which the control should be inserted.
control
Control to be inserted.
Example
private void SectionReport1_ReportStart(object sender, System.EventArgs eArgs)
{
    GrapeCity.ActiveReports.SectionReportModel.TextBox t = new GrapeCity.ActiveReports.SectionReportModel.TextBox();
    GrapeCity.ActiveReports.SectionReportModel.TextBox t2 = new GrapeCity.ActiveReports.SectionReportModel.TextBox();
    t.Text="Insert text here.";
    t2.Text="Insert some more text here.";
    t2.Left=1;
    this.Sections[0].Controls.Add (t);
    this.Sections[0].Controls.Insert(1,t2); 
}
Private Sub SectionReport1_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    Dim t As New GrapeCity.ActiveReports.SectionReportModel.TextBox
    Dim t2 As New GrapeCity.ActiveReports.SectionReportModel.TextBox
    t.Text = "Insert text here."
    t2.Text = "Insert some more text here."
    t2.Left = 1
    Me.Sections(0).Controls.Add(t)
    Me.Sections(0).Controls.Insert(0, t2)
End Sub
See Also

Reference

ControlCollection Class
ControlCollection Members

 

 


Copyright © 2016 GrapeCity, inc. All rights reserved

Support Forum