We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Selection Properties

How can i set the properties of the rows which are selected? I need to do the following things : 1)Data in the selected row should appear as bold. 2)Current row should be highlighted by a transparent color fill defined by the RGB 203/218/240. Please help.

1 Reply

AD Administrator Syncfusion Team December 16, 2004 05:01 AM

Make sure the AllowSelections property has the AlphaBlend flag included. Also set ListBoxSelectionMode to something other than None. Then you should be able to sepecify the row selection color using teh grid.AlphaBlendSelectionColor property. You want want to include the A value you want as well. To bold the text, you can handle the PrepareViewStyleInfo event.
private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
	if(this.gridControl1.Selections.GetSelectedRows(true, false).AnyRangeContains(GridRangeInfo.Row(e.RowIndex)))
	{
		e.Style.Font.Bold = true; 
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon