The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am using some GridDataBoundGrid control in read only mode. I should much prefer the current cell to be just the color of selection, without standing out. Is there a proper style to grant such a wish?
Grateful in advance, Alexey
ADAdministrator Syncfusion Team July 11, 2003 10:25 AM UTC
There is no property setting to manage this, but you can do it by handling the CellDrawn event and filling the cell with the alphablend selection color if it is an the current cell.
private void gridDataBoundGrid1_CellDrawn(object sender, GridDrawCellEventArgs e)
{
GridDataBoundGrid grid = sender as GridDataBoundGrid;
if(grid != null)
{
GridCurrentCell cc = grid.CurrentCell;
if(e.ColIndex == cc.ColIndex && e.RowIndex == cc.RowIndex
&& grid.Selections.Ranges.AnyRangeContains(GridRangeInfo.Cell(e.RowIndex, e.ColIndex))
&& !cc.IsEditing)
{
SolidBrush br = new SolidBrush(grid.AlphaBlendSelectionColor);
e.Graphics.FillRectangle(br, e.Bounds);
br.Dispose();
}
}
}