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.
Syncfusion Feedback

Column Header Row Length

Thread ID:

Created:

Updated:

Platform:

Replies:

44756 Jun 2,2006 07:51 AM UTC Feb 20,2018 04:41 AM UTC Windows Forms 7
loading
Tags: GridControl
Mitch Todd
Asked On June 2, 2006 07:51 AM UTC

Hi, I would like to implement the Syncfusion GridControl in a Windows Explorer style. The Windows ListView control does this as well...I would like the column header to extend all the way to the right side of the GridControl. I have attached an image to show what I''m trying to do. Is the Syncfusion GridControl capable of this? By the way, I''m using Syncfusion version 4.1.0.50...Thanks,

grid_header.zip

Administrator [Syncfusion]
Replied On June 2, 2006 09:25 AM UTC

Hi Mitch, I have created the sample as per your requirement. Please refer to the attached sample for more details. Let me know if this helps. Here is a sample. http://www.syncfusion.com/Support/user/uploads/WindowExplorer_53056e49.zip Thanks for choosing Syncfusion Products. Regards, Haneef

Mitch Todd
Replied On June 2, 2006 09:44 AM UTC

Hey Haneef, Solution looks good. I actually implemented a similar solution, but as you see, in a ListView and in Windows Explorer, mousing over the extended part of the header does not give the same mouseover effect as the other "real" columns. I tried subscribing to the CellMouseHoverEnter event and cancelling it for that cell, but was unsuccessful. Is there another way I can achieve this? Thanks again,

Administrator [Syncfusion]
Replied On June 2, 2006 10:43 AM UTC

Hi Mitch, You need to cancel the extra header drawing in grid using grid''s DrawCell event andthen implement your own drawing in a cell. Here is a code snippet private void gridControl1_DrawCell(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellEventArgs e) { if(e.RowIndex == 0 && e.ColIndex == 4) { e.Style.Enabled = true; System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(e.Bounds, SystemColors.Control,SystemColors.ControlLightLight, System.Drawing.Drawing2D.LinearGradientMode.Vertical); e.Graphics.FillRectangle( brush,e.Bounds); Rectangle rect = e.Bounds; ControlPaint.DrawBorder3D(e.Graphics,rect,Border3DStyle.RaisedInner ); e.Cancel = true; } } //For cancel the activating event in extra header cell private void gridControl1_CurrentCellActivating(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellActivatingEventArgs e) { if(e.RowIndex == 0 && e.ColIndex == 4) { e.Cancel = true; } } Please let me know if this helps. Best Regards, Haneef

Mitch Todd
Replied On June 2, 2006 11:22 AM UTC

Thanks Haneef, that worked perfectly! Now I just need to work on getting the same border style for that cell as the rest of the header. Thanks!

Administrator [Syncfusion]
Replied On June 2, 2006 12:47 PM UTC

Hi Mitch, Sorry for the inconvience caused. You need to set the DisplayEmptyColumns property to true. When you set the DisplayEmptyColumns property of the grid, Grid draws the empty column in a clientarea(it is a clientarea only). It doesn''''t add any column to the grid. Here is a code snippet. this.gridControl1.ColCount = 3; this.gridControl1.Model.Options.DisplayEmptyColumns = true; Here is a modified sample. http://www.syncfusion.com/Support/user/uploads/WindowExplorer_157cc493.zip Please let me know if this helps, Regards, Haneef

Pierre Brito
Replied On February 19, 2018 06:11 PM UTC

Hey Haneef, Solution looks good. I actually implemented a similar solution, but as you see, in a ListView and in Windows Explorer, mousing over the extended part of the header does not give the same mouseover effect as the other "real" columns. I tried subscribing to the CellMouseHoverEnter event and cancelling it for that cell, but was unsuccessful. Is there another way I can achieve this? Thanks again,

Os gráficos do Syncfusion são ótimos para análise de dados.

Arulpriya Ramalingam [Syncfusion]
Replied On February 20, 2018 04:41 AM UTC

Hi Pierre, 
 
Thanks for your feedback. 
 
Please let us know, if you have any other queries. 
 
Regards, 
Arulpriya 


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.

Warning Icon 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.Close Icon

;