I've next code that handle rowFormatting my cells:
private void gridViewRaces_RowFormatting(object sender, RowFormattingEventArgs e) {
foreach (var cellColumn in e.RowElement.Data.Cells) {
var cellInfo = cellColumn as GridViewCellInfo;
if (cellInfo != null) {
cellInfo.Style.DrawFill = true;
if (cellInfo.ColumnInfo.Name == "columnContactProducerName") {
cellInfo.Style.DrawFill = true; cellInfo.Style.BackColor = Color.Yellow; }
else if (cellInfo.ColumnInfo.Name == "columnTransport") { cellInfo.Style.BackColor = Color.Yellow; }
else { cellInfo.Style.BackColor = ColorTranslator.FromHtml((e.RowElement.Data.DataBoundItem as RaceForListDto).Color); } }
}
}
but my cells aren't painting. How to paint some cells in rows on dataBinding?