P
Pablo
Hi people,
Necesito crear n dataviews en tiempo de ejecucion.
I need to create "n" DataViews in runtime.
I tried creating an array this way:
Dim LDView As Array = Array.CreateInstance(GetType(DataView), 10)
DSCapit = New DataSet("DS")
LGCap = New DataTable("DT")
Dim cACCOUNT As DataColumn
cACCOUNT = New DataColumn("ACCOUNT")
LGCap.Columns.Add(cACCOUNT)
DSCapit.Tables.Add(LGCap)
but the asignation is not working:
lDView(0) = New DataView(LGCap) '(1)
neither this way :
lDView.SetValue(New DataView(LGCap), 0) '(2)
This two way compilate but then cancel in runtime
in the array asignacion line (1) y (2)
The problem came from my need to create a tabcontrol with
"n" (variable) tabs within it, according to a database table
contents. And within each tab one datagrid with its corresponding
DataView, all created in runtime.
Any ideas?
TIA
Pablo
Necesito crear n dataviews en tiempo de ejecucion.
I need to create "n" DataViews in runtime.
I tried creating an array this way:
Dim LDView As Array = Array.CreateInstance(GetType(DataView), 10)
DSCapit = New DataSet("DS")
LGCap = New DataTable("DT")
Dim cACCOUNT As DataColumn
cACCOUNT = New DataColumn("ACCOUNT")
LGCap.Columns.Add(cACCOUNT)
DSCapit.Tables.Add(LGCap)
but the asignation is not working:
lDView(0) = New DataView(LGCap) '(1)
neither this way :
lDView.SetValue(New DataView(LGCap), 0) '(2)
This two way compilate but then cancel in runtime
in the array asignacion line (1) y (2)
The problem came from my need to create a tabcontrol with
"n" (variable) tabs within it, according to a database table
contents. And within each tab one datagrid with its corresponding
DataView, all created in runtime.
Any ideas?
TIA
Pablo