Home All Groups Group Topic Archive Search About
Author
2 Mar 2005 1:53 AM
Iams
How can you make a tooltip on a bound column of a datagrid, if possible?  So
I would have different tooltips for each column.  Thanks.

Author
2 Mar 2005 2:48 AM
Elton Wang
Hi Iams,

Although there isn't ToolTip property for bound column,
you can set ToolTip either on Column Header or on each row:

In DataGrid_ItemCreated Event

ListItemType itemType = e.Item.ItemType;

// Set ToolTip on Header:
if(itemType == ListItemType.Header){
      TableCell cell = e.Item.Cells[colIndex];
      Cell.ToolTip = tool tip text;
}

// Set ToolTip on each row:
if(itemType == ListItemType.Item ||
ListItemType.AlternatingItem){
      TableCell cell = e.Item.Cells[colIndex];
      Cell.ToolTip = tool tip text;
}

HTH

Elton Wang
elton_w***@hotmail.com

>-----Original Message-----
>How can you make a tooltip on a bound column of a
datagrid, if possible?  So
Show quoteHide quote
>I would have different tooltips for each column.  Thanks.
>
>
>.
>