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.

change column header separators

Thread ID:

Created:

Updated:

Platform:

Replies:

47433 Aug 4,2006 04:15 AM Aug 8,2006 04:58 AM Windows Forms 3
loading
Tags: Grouping
Mario
Asked On August 4, 2006 04:15 AM

I am working with a GridGroupingControl of the current version. The enclosed images show what I try to achieve and what I currently have.

How can I change the column header separators to have a neat 3D design and have a little bit lesser height than the header cells itself, as shown in the attached image?

Thanks for your help.

Images14.zip

Administrator [Syncfusion]
Replied On August 4, 2006 09:22 AM

Hi Mario,

Try setting the ColumnHeaderRowHeight property of the gridGroupingControl to change the height for column header row. The code snippet is,

this.grid.TableOptions.ColumnHeaderRowHeight = 13;

Thanks,
Haneef

Mario
Replied On August 4, 2006 09:41 AM

Hi Haneef,
I don''t want to change the height of the column header. Just the height of the separator line between two columns in the header should be changed. And the separator should have a sunken 3D look as in the images that I have attached to my first message of this thread. Please have a look at the images to understand what I try to achieve.

Regards, Mario


>Hi Mario,

Try setting the ColumnHeaderRowHeight property of the gridGroupingControl to change the height for column header row. The code snippet is,

this.grid.TableOptions.ColumnHeaderRowHeight = 13;

Thanks,
Haneef

Administrator [Syncfusion]
Replied On August 8, 2006 04:58 AM

Hi Mario,

To avoid the space between the cells, you need to use the TableControlDrawCell event to draw the cell with required size. Please find the code snippet below.

GridTableCellStyleInfo info = e.Inner.Style as GridTableCellStyleInfo;

if( info.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Caption)
{
Rectangle rect = new Rectangle(new Point( e.Inner.Bounds.Location.X ,e.Inner.Bounds.Location.Y ) ,new Size(e.Inner.Bounds.Size.Width,e.Inner.Bounds.Height +2));

e.Inner.Renderer.Draw(e.Inner.Graphics,rect,e.Inner.RowIndex,e.Inner.ColIndex,e.Inner.Style);
e.Inner.Cancel = true;
}

if( info.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.ColumnHeader )
{
Rectangle rect = new Rectangle(new Point( e.Inner.Bounds.Location.X,e.Inner.Bounds.Location.Y - 2) ,new Size(e.Inner.Bounds.Size.Width ,e.Inner.Bounds.Height + 3));
e.Inner.Renderer.Draw(e.Inner.Graphics,rect,e.Inner.RowIndex,e.Inner.ColIndex,e.Inner.Style);
e.Inner.Cancel = true;
}

If you want to cancel the button3D look , you can set the Button3D property to false.

this.grid.TableModel.Properties.Buttons3D = false;

Thanks,
Haneef

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.

;