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 have a GridControl that can be selected by row only. I want to have the ExcelLikeSelectionFrame show a dotted rectangle around the current row - not that thick rectangle.
Is there another property I can set o can I format the excel selection frame differently?
STstanleyj Syncfusion Team January 16, 2006 06:14 AM UTC
Hi Va,
The easier way that can be done is to draw the borders in the PrepareViewStyleInfo handler.
private void gridControl1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
GridControlBase grid = gridControl1;
GridCurrentCell cc = grid.CurrentCell;
if (e.RowIndex > grid.Model.Rows.HeaderCount && e.ColIndex > grid.Model.Cols.HeaderCount
&& cc.HasCurrentCellAt(e.RowIndex))
{
e.Style.Borders.Top = new GridBorder(GridBorderStyle.Dashed, Color.Black, GridBorderWeight.Medium);
e.Style.Borders.Bottom = new GridBorder(GridBorderStyle.Dashed, Color.Black, GridBorderWeight.Thick);
}
}
Also turn RefreshCurrentCellBehavior to RefreshRow.
this.gridControl1.RefreshCurrentCellBehavior = GridRefreshCurrentCellBehavior.RefreshRow;
this.gridControl1.ListBoxSelectionMode = SelectionMode.One;
For more details refer sample in \Syncfusion\Essential Studio\4.1.0.10\windows\Grid.Windows\Samples\Quick Start\HighlightCurrentRow.(also available in earlier versions)
Best regards,
Stanley