回复 20楼q406157290的帖子
给Combox添加一个事件Unloaded,在该事件里调用C1FlexGrid的Invalidate方法,重绘整行;因为如果你换行的话,它会自动重绘换行前的那一行单元格,但是如果不换行的话,它只重绘了你切换的两个单元格;代码如下:
private C1FlexGrid m_Grid;
private int m_RowIndex;
public override void CreateCellContentEditor(C1FlexGrid grid, Border bdr, CellRange rng)
{
if (rng.Column == 2)
{
m_Grid = grid;
m_RowIndex = rng.Row;
......
}
}
void comboBox_Unloaded(object sender, RoutedEventArgs e)
{
m_Grid.Invalidate(new CellRange(m_RowIndex, 0, m_RowIndex, m_Grid.Columns.Count - 1));
} |