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

GridPrepareViewStyleInfoEventArgs e.Style need a way of setting alphablend

How can one set AlphaBlend color on GridPrepareViewStyleInfoEventArgs e.Style.BackColor?
 
Thank you

1 Reply

AK Arun Kumar V Syncfusion Team December 12, 2012 11:49 AM UTC

Hi Gaukhar,

 

Thanks for your interest in syncfusion products.

Query:

How to set AlphaBlend color on GridPrepareViewStyleInfoEventArgs e.Style.BackColor?

To set the backcolor of the gridgrouping control with AlphaBlendSelectionColor the querycellinfo event can be customized. I have attached the customized code for your reference.

Notes:

Similarly the prepareviewstyleinfo event can also be triggered for this operation instead of the querycellinfo event.

Code snippet:

<code>

this.gridGroupingControl1.TableOptions.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Any;

this.gridGroupingControl1.TableModel.Options.ShowCurrentCellBorderBehavior = Syncfusion.Windows.Forms.Grid.GridShowCurrentCellBorder.HideAlways;

<code>

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)

{

if (e.TableCellIdentity.RowIndex == gridGroupingControl1.TableControl.CurrentCell.RowIndex &&

e.TableCellIdentity.ColIndex == gridGroupingControl1.TableControl.CurrentCell.ColIndex &&

!gridGroupingControl1.TableControl.CurrentCell.IsEditing)

{

e.Style.BackColor = gridGroupingControl1.TableModel.Options.AlphaBlendSelectionColor;

}

}</code>

Please let me know if you have any other concerns.

 

Regards,

Arun.

 


Loader.
Live Chat Icon For mobile
Up arrow icon