Example #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;
                        }
                    }
                }
            }
        }
Example #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;
                        }
                    }
                }
            }
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            this.expander                  = new GridExpanderItem();
            this.expander.SignStyle        = SignStyles.Image;
            this.expander.DrawSignBorder   = false;
            this.expander.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Expander_PropertyChanged);
            this.Children.Add(expander);
        }