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;
}
}
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\n"+this.pDictData.FormattedDictData(e.TableCellIdentity.Column.MappingName);
}
}