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. Image for the cookie policy date

GGC column header tooltip

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"+colName;
}
else
e.Inner.Style.CellTipText = e.Inner.Style.FormattedText;
}
}

1 Reply

AD Administrator Syncfusion Team 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"+this.pDictData.FormattedDictData(e.TableCellIdentity.Column.MappingName);
}
}

Loader.
Live Chat Icon For mobile
Up arrow icon