Posted 16 January 2024, 4:15 am EST
I migrate a Windows app from VB6 to VBNET.
I use C1.Win.C1FlexGrid.Classic to design grid.
But I can not merge 2 header columns with the set_MergeCol function
With flexrKTList
            .Clear(ClearWhereSettings.flexClearEverywhere, ClearWhatSettings.flexClearEverything)
            .Cols = 16
            .Rows = 2
            .MergeCells = MergeSettings.flexMergeFixedOnly
            .set_MergeCol(0, True)
            .set_MergeCol(1, True)
            .set_MergeRow(0, True)
            .set_TextMatrix(0, 0, "開始工程")
            .set_TextMatrix(1, 0, "開始工程")
            For intCnt = 1 To 7
                .set_TextMatrix(0, intCnt * 2 - 1, Format(DateAdd(Microsoft.VisualBasic.DateInterval.Day, -1 * (7 - intCnt), mdteBaseDay), "M/d(ddd)"))
                .set_TextMatrix(0, intCnt * 2, .get_TextMatrix(0, intCnt * 2 - 1))
                .set_TextMatrix(1, intCnt * 2 - 1, "件数")
                .set_TextMatrix(1, intCnt * 2, "数量")
                .set_ColWidth(intCnt * 2 - 1, TwipsToPixels(700))
                .set_ColWidth(intCnt * 2, TwipsToPixels(900))
            Next intCnt
            ''.let_Cell(VSFlex7L.CellPropertySettings.flexcpBackColor, 0, 13, 1, 15, &HFFC0C0)
            .set_ColWidth(0, TwipsToPixels(3200))
            .set_ColWidth(15, TwipsToPixels(0))
            .set_FixedAlignment(-1, AlignmentSettings.flexAlignCenterCenter)
            .set_ColAlignment(-1, AlignmentSettings.flexAlignRightCenter)
            .set_ColAlignment(0, AlignmentSettings.flexAlignLeftCenter)
            .set_RowHeight(-1, TwipsToPixels(400))
        End With
                                