Add ToolTips to Individual Cells in DataGrid
Hye. I have this form that has datagrid in it. The datagrid's values are retrieved from a database. Since the value for certain cells are too long, so, we can only see half of the full cell value.
Other than enabling the scroll bar on the datagrid, I want to add another feature which is the tooltip to allow us to see the whole value of the cell. The tooltip will display the full value of the cell where the cursor touches on.
Can somebody help me?
Re: Add ToolTips to Individual Cells in DataGrid
I have never heard of the tooltip being available on cells of a datagrid, though I suppose it is possible I doubt that it is there.
You could in theory mimic one by using a floating label that will pop up in a given location based on the mouse position.
Re: Add ToolTips to Individual Cells in DataGrid
Owh really? I saw the tooltip feature in the datagrid properties, so thought i can add tooltip on the datagrid.
by the way, thank you for your suggestion. I will think of it.
Re: Add ToolTips to Individual Cells in DataGrid
You can add a tooltip to the datagrid but to the best of my knowledge you can add only one and not one per cell. However it may be possible to change the contents of ToolTip based on mouse position within the grid.
Re: Add ToolTips to Individual Cells in DataGrid
Is it possible? But what if the data in the table changes? The tooltip will remain displaying the same value right? I mean it displays the value before changes on the database are made.
Sorry for keep asking. =)
Re: Add ToolTips to Individual Cells in DataGrid
You can use the Datagrids mousemove event to find out where on the grid to pointer is, and sett the tooltip accordingly...
If the data has changed the event should still update the tooltip with the new info....