Ejemplo n.º 1
0
        private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.Row is GridViewDataRowInfo)
            {
                if (showCellBorders)
                {
                    e.CellElement.ResetValue(GridDataCellElement.DrawBorderProperty, Telerik.WinControls.ValueResetFlags.Local);
                }
                else
                {
                    e.CellElement.DrawBorder = false;
                }

                GridDataCellElement cell = e.CellElement as GridDataCellElement;
                if (cell != null && cell.SelfReferenceLayout != null)
                {
                    foreach (RadElement element in cell.SelfReferenceLayout.StackLayoutElement.Children)
                    {
                        GridLinkItem linkItem = element as GridLinkItem;
                        if (linkItem != null)
                        {
                            linkItem.LineStyle = lineStyle;
                            linkItem.ForeColor = lineColor;
                        }
                        GridExpanderItem expanderItem = element as GridExpanderItem;
                        if (expanderItem != null)
                        {
                            expanderItem.LinkLineStyle = lineStyle;
                            expanderItem.LinkLineColor = lineColor;
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void radGridViewTileConfig_ViewCellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.Row is GridViewDataRowInfo)
            {
                e.CellElement.DrawBorder = false;

                GridDataCellElement cell = e.CellElement as GridDataCellElement;
                if (cell != null && cell.SelfReferenceLayout != null)
                {
                    foreach (RadElement element in cell.SelfReferenceLayout.StackLayoutElement.Children)
                    {
                        GridLinkItem linkItem = element as GridLinkItem;
                        if (linkItem != null)
                        {
                            linkItem.LineStyle = DashStyle.Dot;
                            linkItem.ForeColor = Color.Black;
                        }
                        GridExpanderItem expanderItem = element as GridExpanderItem;
                        if (expanderItem != null)
                        {
                            expanderItem.LinkLineStyle = DashStyle.Dot;
                            expanderItem.LinkLineColor = Color.Black;
                        }
                    }
                }
            }
        }