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.
Unfortunately, activation email could not send to your email. Please try again.

Selection Properties

Thread ID:

Created:

Updated:

Platform:

Replies:

22594 Dec 16,2004 02:33 AM Dec 16,2004 05:01 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 16, 2004 02:33 AM

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.

Administrator [Syncfusion]
Replied On 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; 
	}
}

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;