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
close icon

Current Cell showing white in selection

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

1 Reply

AD Administrator Syncfusion Team October 13, 2004 09:20 PM UTC

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);
		}
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon