Hi Nino,
Thanks for using Syncfusion products.
We have analyzed your scenario with provided image and we suspect that your requirement is to set the back color for current cell also while clicking the cell. By default, the selection color will be enabled for the current record except current cell on cell click. In order to set the back color for current cell also on cell click, the QueryCellInfo event can be used. In that event, BackColor property of GridStyleInfo can be used to set the background color. Please refer to the below code example and sample,
Code example:
//Event Subscription
this.gridDataBoundGrid1.Model.QueryCellInfo += Model_QueryCellInfo;
//Event Handling
private void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
int rowIndex = gridDataBoundGrid1.CurrentCell.RowIndex;
bool isSelected = gridDataBoundGrid1.Model.Selections.Ranges.Contains(GridRangeInfo.Row(rowIndex));
if (isSelected && (GridRangeInfo.Row(e.RowIndex) == GridRangeInfo.Row(rowIndex)))
{
e.Style.BackColor = Color.FromArgb(153, 204, 255);
}
} |
Screenshot
Regards,
Arulpriya