-
August 11th, 2011, 10:35 PM
#1
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?
-
August 11th, 2011, 10:51 PM
#2
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.
Always use [code][/code] tags when posting code.
-
August 11th, 2011, 11:26 PM
#3
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.
-
August 12th, 2011, 01:07 AM
#4
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.
Always use [code][/code] tags when posting code.
-
August 12th, 2011, 01:52 AM
#5
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. =)
-
August 12th, 2011, 02:54 AM
#6
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....
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|