Tooltip on a column?

I

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.
 
E

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
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top