We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Flat Headers

Is is possible to have a completly flat column header. The current GridCellAppearance.Flat is not completly flat as there is a 1 pixel blank line in the upper part

3 Replies

Administrator March 1, 2005 10:21 AM UTC

Also, try setting the style.CellType = "Static".

Administrator March 1, 2005 10:44 AM UTC

This time, i have no border in the header cells...

Administrator March 1, 2005 01:09 PM UTC

Set the borders you want to see in th estyle. GridStyleInfo style = this.gridDataBoundGrid1.BaseStylesMap["Column Header"].StyleInfo; style.CellType = "Static"; style.CellAppearance = GridCellAppearance.Flat; Color c = SystemColors.ControlDark; style.Borders.Right = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Top = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Left = GridBorder.Empty; style = this.gridDataBoundGrid1.BaseStylesMap["Header"].StyleInfo; style.CellType = "Static"; style.CellAppearance = GridCellAppearance.Flat; style.Borders.Right = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Top = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Left = new GridBorder(GridBorderStyle.Solid, c); style = this.gridDataBoundGrid1.BaseStylesMap["Row Header"].StyleInfo; style.CellType = "Static"; style.CellAppearance = GridCellAppearance.Flat; style.Borders.Right = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, c); style.Borders.Top = GridBorder.Empty; style.Borders.Left = new GridBorder(GridBorderStyle.Solid, c);
Loader.
Live Chat Icon For mobile
Up arrow icon