Question access dynamic control in container?

cjtjamandra

New member
Joined
Sep 7, 2008
Messages
1
Programming Experience
3-5
HI, iam creating a dynamic flexgrid inside a tabpage on my form using this code:


VB.NET:
Dim Flextemp As New AxMSFlexGridLib.AxMSFlexGrid
Flextemp.Location = New System.Drawing.Point(8, 8)
Flextemp.Size = New System.Drawing.Size(1064, 784)
Flextemp.Name = "AxMSFlexGrid1"
new_page.Controls.Add(Flextemp)

'new page is a dynamic tabpage created

My problem is how can i access the flexgrid? when i try to do this:
VB.NET:
Flextemp.Rows = 100
Flextemp.Cols = 20
Flextemp.Rows = 1
Flextemp.Col = 1
Flextemp.Text = "Text"

i get this error:

An unhandled exception of type 'InvalidActiveXStateException' occurred in axinterop.msflexgridlib.dll


Please help...........
 
Back
Top