回复 1楼zhangyi的帖子
有关FindRow的方法,代码参考如下:
- void _btnFind_Click(object sender, EventArgs e)
- {
- // use the regular FindRow
- var index = this._flex.FindRow(_txtSearch.Text, 1, _flex.Col, false, true, true);
- if (index > -1)
- {
- this._flex.Row = index;
- C1.Win.C1FlexGrid.CellStyle cs = this._flex.Styles.Add("myStyle");
- cs.Font = new Font("Tahoma", 10, FontStyle.Bold);
- cs.ForeColor = Color.Red;
- this._flex.SetCellStyle(index, 1, cs);
- }
- }
复制代码
这段代码的意思是查询TextBox中的Text,查到后将C1FlexGrid.Row设置为此行,并设置颜色。 |