GridSelectionChangedEventArgs contains OldRanges object which is always null. As result i can''t
reset default TextColor of the previosly selected row [Color.Blue] as by your example. Is there any other way ?
>Hi Roman,
>
>Thanks for your feedback. The secnerio, you have faced is due to the precedence level. In general, if you set the backcolor, the transparentbackground property will be false ( back color excluding headers). But, if you set the background image it becomes true ( see this : in the windows generated code of gridcontrol ). If you set this property to false then, it behaves normallyas before, as you set the backcolor.
>The Forecolor, generally means the textcolor in the grid. In the syncfusion grid, there is a property called TextColor, using this you can set the grid forecolor / text color. You can use the prepareviewstyleinfo event to change the Header row forecolor and the SelectionChanging event to change the Selected fore color. Here is the code snippet.
>
> private void gridControl1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
> {
> if(e.ColIndex > 0 && e.RowIndex == 0)
> {
> e.Style.TextColor = Color.White;
> }
> }
>
> private void gridControl1_SelectionChanging(object sender, Syncfusion.Windows.Forms.Grid.GridSelectionChangingEventArgs e)
> {
> GridStyleInfo style = new GridStyleInfo();
> style.TextColor = Color.Blue;
> this.gridControl1.ChangeCells(e.Range,style);
> }
>
>The Alphablendselectioncolor, is used to set the selection color ( selecting datas / rows / columns using mouse )
>
Here is a sample for implemnting it.
>
>Let us know if you need any further assistance.
>
>Regards,
>Madhan.