BackgroundColor remain selection BackgroundColor

3 posts, 1 answers
  1. Andre
    Andre avatar
    41 posts
    Member since:
    Feb 2018

    Posted 14 Dec 2018 Link to this post

    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. Answer
    Dimitar avatar
    2937 posts

    Posted 17 Dec 2018 Link to this post

    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.

    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.
  3. Andre
    Andre avatar
    41 posts
    Member since:
    Feb 2018

    Posted 18 Dec 2018 Link to this post

    thank you very much !
Back to Top