ActiveReports 9
Control Property (CustomControl)
Example 

Gets or sets a reference to the hosted control.
Syntax
'Declaration
 
Public ReadOnly Property Control As System.Windows.Forms.Control
public System.Windows.Forms.Control Control {get;}
Example
private void Detail1_Format(object sender,System.EventArgs e)
{
 DataTable dt = new DataTable();
 dt.Columns.Add("Name", typeof(string));
 dt.Columns.Add("Age", typeof(int));
 dt.Rows.Add("Name1", 23);
 dt.Rows.Add("Name2", 34);
 System.Windows.Forms.DataGridView gridView = ((System.Windows.Forms.DataGridView)this.customControl1.Control);
 gridView.DataSource = dt;
}
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
Dim dt As New DataTable()
dt.Columns.Add("Name", GetType(String))
dt.Columns.Add("Age", GetType(Integer))
dt.Rows.Add("Name1", 23)
dt.Rows.Add("Name2", 34)
Dim gridView As System.Windows.Forms.DataGridView = DirectCast(Me.customControl1.Control, System.Windows.Forms.DataGridView)
gridView.DataSource = dt
End Sub
See Also

Reference

CustomControl Class
CustomControl Members

How To

Use Custom Controls on Reports (TreeView)

 

 


Copyright © 2016 GrapeCity, inc. All rights reserved

Support Forum