I want to add a Tooltip for the text in a column. If I specify the column name explicitly, this works:
<igDataGrid:TemplateColumn Key="Description" > <igDataGrid:TemplateColumn.ItemTemplate> <DataTemplate> <TextBlock Height="14" Text="{Binding Description}" ToolTipService.ToolTip="{Binding Description}" > </TextBlock> </DataTemplate> </igDataGrid:TemplateColumn.ItemTemplate></igDataGrid:TemplateColumn>
But, I'd like to define the template once as a resource and use it for any column - is there any way to avoid the hard-coded binding ("Description" in this case)? Possibly by referencing the Key of the ItemTemplate somehow?
Or is there a way to do this with the TextColumn, or a Style? I've tried several ways unsuccessfully.
Thanks,Keith
Thanks
A TextColumn is not a FrameworkElement, as Column's aren't visual.
Currently the only way to get tooltips, until we add the feature, is to use a TemplateColumn and put the ToolTipService.Tooltip on an element in your DataTemplate.
-SteveZ
when i try to use it in a text column it throws exceptions
this: <igGrid:TextColumn Key="Quantity" ToolTipService.ToolTip="{Binding LineLabel}"
Throws: AG_E_PARSER_PROPERTY_NOT_FOUND [Line: 540 Position: 86]
This: <igGrid:TextColumn Key="Quantity" ToolTipService.ToolTip="TEst TOOL"
Throws: "AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 540 Position: 86]"
when i put it in a Templated Column it works??
Hard-coding works. But, I need it to be bound to the specific property on the data context for the row that the column represents.
does this not work in a TextColumn?
ToolTipService.ToolTip
="qqqqqqq"