回复 34楼Alice的帖子
C1FlexGrid1.ColumnHeaders.Rows.Clear()
C1FlexGrid1.ItemsSource = The_News_Table.DefaultView
C1FlexGrid1.AllowMerging = AllowMerging.ColumnHeaders
Dim ch = C1FlexGrid1.ColumnHeaders
ch.Rows.Add(New Row())
ch.Rows.Add(New Row())
Dim title As New List(Of String)() From { _
"序号", _
"部门", _
"检测时间", _
"受检单位名称", _
"联系人", _
"电话", _
"行业类别", _
"报告份数", _
"核算款", _
"应收款", _
"实收款", _
"是否开发票", _
"回款日期", _
"相关说明" _
}
For i As Integer = 0 To ch.Columns.Count - 1
ch(0, i) = "收费明细表 (" + CDate(TextBox_Find1.Text).ToString("yyyy年MM月dd日") + "——" + CDate(TextBox_Find2.Text).ToString("yyyy年MM月dd日") + ")"
ch(1, i) = title(i)
Next
ch.Rows(0).AllowMerging = True
ch.Rows(0).HorizontalAlignment = System.Windows.HorizontalAlignment.Center
C1FlexGrid1.AutoSizeColumns(0, C1FlexGrid1.Columns.Count - 1, 10, True, False) |