private void fpSpread2_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
fpSpread2.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
fpSpread2.ActiveSheet.AddSelection(e.Row, 0, 1, 1);
fpSpread2.ActiveSheet.ActiveRow.BackColor = Color.YellowGreen;
}
用了这个代码实现了选中的背景颜色为黄绿色,但是每次出现黄绿色都需要单击两次,而且当我单击下一行的时候,上一行的背景色依然为黄绿色,不知道是哪有问题? |