|
Users sometime require the ability to hide specific columns of their DataField data. This can be done by setting the ColWidth property of the desired column to 0. The approach below demonstrates how to hide the second column of data.
Ex: (Note the ColWidth property will need to be set after every RefreshData call)
Option Explicit Private Sub DCube1_FetchData() 'add data DCube1.AddRowEx Array("RowData1", 100, 200) End Sub Private Sub Form_Load() Dim f As DynamiCubeLibCtl.Field With DCube1 'set up the cube .AutoDataRefresh = False .DCConnectType = DCCT_UNBOUND Set f = .Fields.Add("Row", "Row", 2) Set f = .Fields.Add("Data1", "Data1", 3) Set f = .Fields.Add("Data2", "Data2", 3) .RefreshData 'hide our second column of data .ColWidth(1) = 1 .AutoDataRefresh = True End With End Sub
You can find additional information about the use of the ColWidth property here, and the attached sample demonstrates the use of the code above to hide the second column of data .
Applies To: DynamiCube 3.0
|