Posted 15 November 2023, 7:30 pm EST
Hello Wolfgang,
Thank you for bringing this matter to our attention and for the sample.
We were able to replicate the behavior at our end, so we have escalated to the development team to get their insights on this behavior. We will give you an update as soon as we get any necessary information.
However, until then, you can merge your custom style with a new style for the column and the cell created using the StyleNew property of Column and CellRange as follows:
CellStyle style = this.c1FlexGrid1.Styles.Add("StyleDataMap", this.c1FlexGrid1.Styles.Normal);
style.DataMap = dataMap;
//this.c1FlexGrid1.Cols[1].Style = style;
var newStyle = this.c1FlexGrid1.Cols[1].StyleNew;
newStyle.MergeWith(style);
for (int row = this.c1FlexGrid1.Rows.Fixed; row < this.c1FlexGrid1.Rows.Count; row++)
{
//Create Style for each cell:
CellStyle styleCell = this.c1FlexGrid1.Styles.Add("StyleDataMap_Row" + row, this.c1FlexGrid1.Styles.Normal);
styleCell.DataMap = dataMap;
//this.c1FlexGrid1.SetCellStyle(row, 2, styleCell);
var cellRange = c1FlexGrid1.GetCellRange(row, 2);
var newCellStyle = cellRange.StyleNew;
newCellStyle.MergeWith(styleCell);
}
Please refer to the attached sample for implementation.
[Internal Tracking ID: C1WIN-31390]
Regards,
Prabhat Sharma.
FlexDataMapReset.zip