locked
how to show tooltip for datagrid cell RRS feed

  • Question

  • Hi i have data grid, in that cell i have fixed the width. If my content is bigger than the specified width , it should show the content on mouseover  Tooltip should show all the data which is in that cell..

    Thursday, November 11, 2010 12:07 AM

Answers

  • I assume your data is a text. I would probably start by defining a new CellTemplate and then use the tooltip for the TextBlock I have there. You can bind the same property for each but use a converter to shorten then text in the textblock. There are also other possibilities and this is just one. I hope this helps.

    Thursday, November 11, 2010 12:29 AM
  • Your explanation is not elaborate. So I make some assumptions. If you are using TextBox control to show data, you can bind data to "ToolTipService.ToolTip" property of textbox. So when data overflows, user can over on textbox and view original data in tooltip.

    Thursday, November 11, 2010 5:32 AM

All replies

  • I assume your data is a text. I would probably start by defining a new CellTemplate and then use the tooltip for the TextBlock I have there. You can bind the same property for each but use a converter to shorten then text in the textblock. There are also other possibilities and this is just one. I hope this helps.

    Thursday, November 11, 2010 12:29 AM
  • Your explanation is not elaborate. So I make some assumptions. If you are using TextBox control to show data, you can bind data to "ToolTipService.ToolTip" property of textbox. So when data overflows, user can over on textbox and view original data in tooltip.

    Thursday, November 11, 2010 5:32 AM