Completed
Last Updated: 08 Jun 2018 11:18 by Dimitar
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 06 Jun 2018 08:15
Category: GridView
Type: Bug Report
1
FIX. RadGridView - Indicate errors example shows incorrect red border around a valid value
To reproduce: please refer to the attached gif file illustrating the steps how to reproduce the problem with the Demo application. 

Workaround:

        private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            GridDataCellElement cell = e.CellElement as GridDataCellElement;
            if (cell != null)
            {
                if (cell.ContainsErrors)
                {
                    cell.DrawBorder = true;
                    cell.BorderBoxStyle = BorderBoxStyle.FourBorders;

                    cell.BorderBottomColor = cell.BorderTopColor = cell.BorderRightShadowColor = cell.BorderLeftShadowColor = Color.Transparent;
                    cell.BorderBottomShadowColor = cell.BorderTopShadowColor = cell.BorderRightColor = cell.BorderLeftColor = Color.Red;
                    cell.BorderBottomWidth = cell.BorderTopWidth = cell.BorderRightWidth = cell.BorderLeftWidth = 1;

                    cell.BorderDrawMode = BorderDrawModes.HorizontalOverVertical;
                    cell.ZIndex = 2;
                }
                else
                {
                    cell.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local);

                    cell.ResetValue(LightVisualElement.BorderBottomColorProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.BorderBottomShadowColorProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.BorderBottomWidthProperty, ValueResetFlags.Local);

                    cell.ResetValue(LightVisualElement.BorderTopColorProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.BorderTopShadowColorProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.BorderTopWidthProperty, ValueResetFlags.Local);

                    cell.ResetValue(LightVisualElement.BorderLeftColorProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.BorderLeftShadowColorProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.BorderLeftWidthProperty, ValueResetFlags.Local);

                    cell.ResetValue(LightVisualElement.BorderDrawModeProperty, ValueResetFlags.Local);
                    cell.ResetValue(LightVisualElement.ZIndexProperty, ValueResetFlags.Local);
                }
            }
        }
Attached Files:
0 comments