Posted 14 February 2018, 2:52 am EST
i solve it by extensions overwrite
the problem is when change style backcolor then copy all styles to other cells
i write extension to solve it
private static void set_CellflexcpBackColor(this C1.Win.C1FlexGrid.Classic.C1FlexGridClassic grid, int row1, int col1, int row2, int col2, object newVal)
{
var boldCellList = new List();
//Color all cells that doesn't have a bold style
for (var row = row1; row <= row2; row++)
{
for (var col = col1; col <= col2; col++)
{
if (Convert.ToBoolean(grid.get_Cell(CellPropertySettings.flexcpFontBold, row, col)))
{
//Add Cell to boldCellList to color after iternations
boldCellList.Add(new Tuple<int, int>(row, col));
}
else
{
grid.set_Cell(CellPropertySettings.flexcpBackColor, row, col, row, col, newVal);
}
}
}
//Color all cells that have a bold style
foreach (Tuple<int, int> item in boldCellList)
{
grid.set_Cell(CellPropertySettings.flexcpBackColor, item.Item1, item.Item2, item.Item1, item.Item2, newVal);
}
}
thanks!!!
saleem.