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

Tooltip for column header.

Hi,

Which property is used to display ToolTip for column header in GridGroupingControl?

Thnaks,
Vinod

4 Replies

MA mark May 29, 2007 03:40 PM UTC

Look at the CellTipText property.

>Hi,

Which property is used to display ToolTip for column header in GridGroupingControl?

Thnaks,
Vinod


HA haneefm Syncfusion Team May 29, 2007 06:38 PM UTC

Hi Sharff,

You can handle the QueryCellStyleInfo event to display column header tooltip in a grid. Here is the code snippet:

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.TableCellIdentity.Column.MappingName;
}

Here is a forum thread that show the Abbreviated Header cell tooltip text in a grid.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=52264

Best regards,
Haneef


VI Vinod May 30, 2007 03:37 PM UTC

Thanks Haneef.

But this is quite difficult in my case.

Is there any way to assign tooltip text to the column, when column is added to either TableDescriptor.Columns collection or TableDescriptor.VisibleColumns collection?

Thanks,
Vinod


HA haneefm Syncfusion Team May 30, 2007 08:46 PM UTC

Hi Vinod,

You can handle the VisibleColumns.Changed event and set the CellTipText property of the newly added column in a grid. Here is a code snippet

this.gridGroupingControl1.TableDescriptor.VisibleColumns.Changed +=new Syncfusion.Collections.ListPropertyChangedEventHandler(VisibleColumns_Changed);

private void VisibleColumns_Changed(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
{
if( e.Action == Syncfusion.Collections.ListPropertyChangedType.Add )
{
GridVisibleColumnDescriptor gvd = e.Item as GridVisibleColumnDescriptor;
this.gridGroupingControl1.TableDescriptor.Columns.Add(gvd.Name);
this.gridGroupingControl1.TableDescriptor.Columns[gvd.Name].Appearance.ColumnHeaderCell.CellTipText = "\"welcome\"";
}
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon