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 column header tooltip

Thread ID:

Created:

Updated:

Platform:

Replies:

58588 Mar 25,2007 04:18 PM UTC Mar 25,2007 05:49 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 25, 2007 04:18 PM UTC

Hi,
V4.4.0.51 & VS2003
In GGC grid, when mouse hover over a column header, I want to display the header text and the column's field name. I used following code in TableControlPrepareViewStyleInfo events to do it. It works OK except for the grid not refrech properly. I mean the grid displays some of rows or cells. but if you keep click the grid cell. It will eventually display all. I know the lines to get the column name caused the problem:
GridTableCellStyleInfo style = gdBase.TableControl.Model[1, e.Inner.ColIndex];
string colName = style.TableCellIdentity.Column.Name;
Is there easy way to get the column name?

Thanks,

Lan

//my codes

this.gdBase.TableControlPrepareViewStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventHandler(this.gdBase_TableControlPrepareViewStyleInfo);
private void gdBase_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
{

// Tool tip text
if( e.Inner.RowIndex > 0 && e.Inner.ColIndex >= 0 )
{
if (e.Inner.RowIndex ==1)
{
GridTableCellStyleInfo style = gdBase.TableControl.Model[1, e.Inner.ColIndex];
string colName = style.TableCellIdentity.Column.Name;
e.Inner.Style.CellTipText = e.Inner.Style.FormattedText+"\r\n"+colName;
}
else
e.Inner.Style.CellTipText = e.Inner.Style.FormattedText;
}
}

Administrator [Syncfusion]
Replied On March 25, 2007 05:49 PM UTC

Hi,
Please ignore this incident since I have figured our it.
Thank you.

Lan

FYI:
I've added code in QueryCellStyleInfo event to display column header tooltip. Here is the codes:

this.gdBase.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(this.gdBase_QueryCellStyleInfo);
private void gdBase_QueryCellStyleInfo(object sender,Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
//setup column header tooltip
if( e.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell)
{
e.Style.CellTipText = e.Style.FormattedText+"\r\n"+this.pDictData.FormattedDictData(e.TableCellIdentity.Column.MappingName);
}
}

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.

Please sign in to access our forum

or the page will be automatically redirected to 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

;