This is a migrated thread and some comments may be shown as answers.

BackgroundColor remain selection BackgroundColor

2 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andre
Top achievements
Rank 1
Andre asked on 14 Dec 2018, 02:50 PM

why the background-color remains the same although another line was selected.
this only applies if foreColor is changed.

                    if (Convert.ToDateTime(cell.Value.ToString()) != Convert.ToDateTime(e.Row.Cells[ColumnTitle.GridOperation.Liefertermin].Value.ToString())) {
                        cell.NumberOfColors = 1;
                        cell.DrawFill = true;
                        cell.ForeColor = ColorDeltaLieferterminAbteilungstermin.FColor;
                        cell.Font = new Font(DefaultFont, FontStyle.Bold);
                    } else {
                        cell.Image = null;
                        cell.DrawFill = false;
                        cell.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
                        cell.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
                        cell.ResetValue(LightVisualElement.NumberOfColorsProperty, ValueResetFlags.Local);
                        cell.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
                    }

thanks andre

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 17 Dec 2018, 01:03 PM
Hello Andre,

When setting the DrawFill property to true you need to set the BackColor as well. If you want the default BackColor do not set the DrawFill property.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Andre
Top achievements
Rank 1
answered on 18 Dec 2018, 05:11 PM
thank you very much !
Tags
GridView
Asked by
Andre
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Andre
Top achievements
Rank 1
Share this question
or