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.
Unfortunately, activation email could not send to your email. Please try again.

GroupingGrid border colors

Thread ID:

Created:

Updated:

Platform:

Replies:

20398 Oct 15,2004 01:39 PM Oct 19,2004 10:20 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 15, 2004 01:39 PM

Hi, How do I do the following layout? I''d like to have a black border around the entire groupinggrid control. Next, I''d like to have a gray line between each row and column EXCEPT in the column header...no vertical lines between the column headers.

Administrator [Syncfusion]
Replied On October 15, 2004 06:22 PM

Try setting these properties. this.ggc.TableDescriptor.Appearance.AnyCell.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, Color.Gray, GridBorderWeight.Thin); this.ggc.TableDescriptor.Appearance.AnyCell.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Gray, GridBorderWeight.Thin); this.ggc.TableDescriptor.Appearance.AnyHeaderCell.Borders.Right = new GridBorder(GridBorderStyle.None);//, Color.Gray, GridBorderWeight.Thin); this.ggc.TableDescriptor.Appearance.RecordRowHeaderCell.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Gray, GridBorderWeight.Thin); this.ggc.TableDescriptor.Appearance.AlternateRecordRowHeaderCell.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Gray, GridBorderWeight.Thin); this.ggc.TableDescriptor.Appearance.AddNewRecordRowHeaderCell.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Gray, GridBorderWeight.Thin); this.ggc.TableDescriptor.Appearance.AnyHeaderCell.CellType = "Static"; //GridTableDescriptor td = this.ggc.TableDescriptor; //td.Columns[td.VisibleColumns[td.VisibleColumns.Count-1].Name].Appearance.ColumnHeaderCell.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Black, GridBorderWeight.Thin); this.ggc.ThemesEnabled = false; this.ggc.BorderStyle = BorderStyle.FixedSingle;

Administrator [Syncfusion]
Replied On October 19, 2004 05:37 AM

Hi Clay, While that piece of code did do what I requested, it does introduce one problem. The sort indicator (up/down arrow head) in the column no longer appears. Can this be fixed? Also, is there a property to set the gridgrouping control''s border color. I can''t seem to find one and the default is black. How can it make it blue?

Administrator [Syncfusion]
Replied On October 19, 2004 06:24 AM

The reason the sort indicator is gone is because of the "Static" setting. Our sort indicator column header cell derives from teh statndard header cell. And this cell does not use borders, but instead draws itself raised for a better ''header type'' effect. So, to be able to remove the border, you have to not use a header cell (hence the change to Static). But this does remove support for the sort indicator. There is no property setting that will allow you to get both no header border and the sort bitmap. One thing you can do is to handle the TableControlCellDrawn event, and draw the sort indicator yourself. You would have to check if the column being drawn is in the e.TableControl.TableDescriptor.SortedColumns column. There is no color property for a Control.BorderStyle which is all that is around the grid. One thing you can do is to add a panel to the form where your grid is and set the panel backcilor to the color you want to see the border. Also set the panel.DockPadd = 1 (or how wide you want the border. Then set the grid''s BorderStyle to none, and drop the grid on the panel with grid.Dock = Fill. This should make teh grid have a colored border.

Administrator [Syncfusion]
Replied On October 19, 2004 06:55 AM

Hi Clay, Thanks for the explaination. I can live with bordered column headers (just so the sort indicator can show) and the entire groupinggrid control''s border workaround works great! One more question. I notice that when any cell within the grid gets focus, another border is drawn (in black) around it. Is there any way to eliminate this effect.

Administrator [Syncfusion]
Replied On October 19, 2004 10:20 AM

Try setting: this.gridGroupingControl1.TableModel.Options.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;