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.

Current Cell showing white in selection

Thread ID:

Created:

Updated:

Platform:

Replies:

20244 Oct 13,2004 02:39 AM Oct 13,2004 05:20 PM Windows Forms 1
loading
Tags: Grouping
Dominic Morris
Asked On October 13, 2004 02:39 AM

Is there anyway of making the current cell appear alpha-blended along with the rest of any selection range? thanks, D.

Administrator [Syncfusion]
Replied On October 13, 2004 05:20 PM

Being the currentcell and being selected are normally two different things. If you want to make the currentcell look selected while it is not actively being edited, then you can handle the TableControlCellDrawn event and paint it with the blended color to get the selected effect. But while the cell is being edited, it is the embedded cell control that this color, and things like teh RichText control which is used by our TextBox cell does not support alphablending.
private void gridGroupingControl1_TableControlCellDrawn(object sender, GridTableControlDrawCellEventArgs e)
{
	GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
	if(e.Inner.RowIndex ==  cc.RowIndex && e.Inner.ColIndex == cc.ColIndex)
	{
		using(Brush br = new SolidBrush(this.gridGroupingControl1.TableControl.Model.Options.AlphaBlendSelectionColor))
		{
			e.Inner.Graphics.FillRectangle(br, e.Inner.Bounds);
		}
	}
}

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.

;