Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
930
Horizontal border of a column
posted

Hi,

Is it possible to make transparent, the horizontal border of the grid for only one particular column? I'm guessing I need to implement a Drawfilter? If so, could you please direct me to an example of one in use, in the knowledge base perhaps? Thanks!

Ryan

 

 

Parents
No Data
Reply
  • 930
    Verified Answer
    Offline posted

    I found a solution by using a drawfilter. I can just set the color of the border to the grid backcolor.

            bool IUIElementDrawFilter.DrawElement(Infragistics.Win.DrawPhase drawPhase, ref Infragistics.Win.UIElementDrawParams drawParams)
            {           
                foreach (UltraGridRow row in this.grid.Rows)
                {
                    UIElement FirstCellUIElement = row.Cells[0].GetUIElement();               
                    if (FirstCellUIElement != null)
                    {                   
                        Rectangle FirstCell = FirstCellUIElement.Rect;
                        FirstCell.Inflate(0, 1);
                        drawParams.DrawBorders(
                            UIElementBorderStyle.Solid,
                            System.Windows.Forms.Border3DSide.All,
                            Color.White,
                            Color.White,
                            FirstCell,
                            drawParams.InvalidRect);
                    }
                }
                return false;
            }

     

     

Children
No Data