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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC and link label custom cell type

Thread ID:





40442 Feb 2,2006 07:55 PM UTC Feb 6,2006 03:05 PM UTC WinForms 4
Tags: GridControl
Brian Corley
Asked On February 2, 2006 07:55 PM UTC

I have taken the link label custom cell type example and modified it for my use. However, in nested tables the style (text color) of the link will not change for the mouse over and mouse out events even though the code is being executed. Any ideas?

Brian Corley
Replied On February 3, 2006 02:14 PM UTC

The code below is not called when the user mouses over any nested table link label cell. The top level table works as expected. protected override void OnDraw(System.Drawing.Graphics g, System.Drawing.Rectangle clientRectangle, int rowIndex, int colIndex, Syncfusion.Windows.Forms.Grid.GridStyleInfo style) { style.Font.Underline = true; if(_drawHotLink) { style.TextColor = ActiveLinkColor; } base.OnDraw(g, clientRectangle, rowIndex, colIndex, style); }

stanleyj [Syncfusion]
Replied On February 3, 2006 02:50 PM UTC

Hi Brian, We could see the issue, will get back to you with solution. Thanks, Stanley

Administrator [Syncfusion]
Replied On February 3, 2006 05:38 PM UTC

Hi Brian, LinkLabel cell is not compatible with the NestedTables. Please change the CellRenderer''s DrawLink method as follows to fix the issue: private void DrawLink(bool useHotColor, int rowIndex, int colIndex) { if(useHotColor) _drawHotLink = true; this.Grid.InvalidateRange(GridRangeInfo.Cell(rowIndex, colIndex), GridRangeOptions.None); this.Grid.GetGridWindow().Update(); _drawHotLink = false; } Also we noticed an issue with the current implementation. If you hover over the cell and ''ALT+TAB'' to switch to a new window and again back to the Grid, you could see all linklabel cells are highlighted. You can avoid it by setting the drawHotLink flag to false and refreshing the Grid. public LinkLabelCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { this.Grid.GotFocus += new EventHandler(Grid_GotFocus); .. .. } private void Grid_GotFocus(object sender, EventArgs e) { this._drawHotLink = false; this.Grid.Refresh(); } We will also update the shipping sample. Best regards, Jay

Brian Corley
Replied On February 6, 2006 03:05 PM UTC

works like a champ, thansk, for the help.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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