很麻烦的,要自己添加grid,然后,要自己绑定各种事件
Dim _flex = New C1.Win.C1FlexGrid.C1FlexGrid()
_flex.Cols.Count = 3
_flex.Rows.Count = 7
_flex.Cols(1).Caption = "Item"
_flex.Cols(2).Caption = "Value"
_flex.Styles.Fixed.BackColor = Color.DarkGray
_flex.Styles.Fixed.ForeColor = Color.White
'create styles with data types, formats, etc
Dim cs = _flex.Styles.Add("emp")
cs.DataType = Gettype(String)
cs.ComboList = "|Tom|Dick|Harry"
cs.ForeColor = Color.Navy
cs = _flex.Styles.Add("date")
cs.DataType = Gettype(DateTime)
cs.Format = "dd-MMM-yy"
cs.ForeColor = Color.DarkGoldenrod
cs = _flex.Styles.Add("curr")
cs.DataType = Gettype(Decimal)
cs.Format = "c"
cs.ForeColor = Color.DarkGreen
cs = _flex.Styles.Add("bool")
cs.DataType = Gettype(Boolean)
cs.ImageAlign = 1
'show captions
_flex(1, 1) = "Employee"
_flex(2, 1) = "Start"
_flex(3, 1) = "End"
_flex(4, 1) = "Amount"
_flex(5, 1) = "Discount"
_flex(6, 1) = "Active"
'assign styles to editable cells
Dim rg = _flex.GetCellRange(1, 2)
rg.Style = _flex.Styles("emp")
rg = _flex.GetCellRange(2, 2, 3, 2)
rg.Style = _flex.Styles("date")
rg = _flex.GetCellRange(4, 2, 5, 2)
rg.Style = _flex.Styles("curr")
rg = _flex.GetCellRange(6, 2)
rg.Style = _flex.Styles("bool")
Forms("窗口1").panel.Controls.add(_flex)
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=72491&skin=0