Posted 25 January 2021, 9:15 am EST - Updated 3 October 2022, 11:24 pm EST
Good day,
I need your support for the following challenge: i have to build a Flexgrid that shows data as in the picture attached. So a Flexgrid with 3 headers following with data readed from the database if it exist otherwise it can be input from the user.
In normal case i use the following code in VB for the Flexgird to Show data from the datatbase:
SqlStr = “SELECT * From Table1”
Dim Odbcda As New Odbc.OdbcDataAdapter(SqlStr, connectionString)
odbcDataSet = New DataSet
Odbcda.Fill(odbcDataSet, “Liste”)
Dim dt As DataTable = odbcDataSet.Tables(“Liste”)
DGU.DataSource = dt
With flexgrid
.Cols(1).Caption = “Fld1”
.Cols(1).Width = 50
.Cols(2).Caption = “Fld2”
.Cols(2).Width = 50
.Cols(3).Caption = “Fld3”
.Cols(3).Width = 50
.Cols(4).Caption = “Fld4”
.Cols(4).Width = 50
.Cols(5).Caption = “Fld5”
.Cols(5).Width = 50
.Cols(6).Caption = “Fld6”
.Cols(6).Width = 50
.Cols(7).Caption = “Fld7”
.Cols(7).Width = 50
.Cols(8).Caption = “Fld8”
.Cols(8).Width = 50
.Cols(9).Caption = “Fld9”
.Cols(9).Width = 50
.Cols(10).Caption = “Remark”
.Cols(10).Width = 50
End With
Can you please support and provid a VB Sample to get the Flexgrid with 3 headers as in the Picture?
Best regards
Said
