Header-tooltip
3 Replies
AN
Ashok N
Syncfusion Team
May 16, 2014 04:15 PM UTC
Hi Juraj,
You can achieve your requirement by setting HeaderToolTipTemplate for that particular column. Please refer the following code snippet
|
<syncfusion:SfDataGrid.Columns> <syncfusion:GridTextColumn MappingName="Id"> <syncfusion:GridTextColumn.HeaderToolTipTemplate> <DataTemplate> <TextBlock Text="order id" TextWrapping="Wrap"/> </DataTemplate> </syncfusion:GridTextColumn.HeaderToolTipTemplate> </syncfusion:GridTextColumn> </syncfusion:SfDataGrid.Columns> |
Please let us know if you require further assistance
Thanks,
Ashok
JA
Jha Abhishek Kumar
January 9, 2019 05:47 AM UTC
Hi ,
Can you help me with these solution.
1.How Can we give Header Tool tip same as Header Text without tool tip template ?.
2.if I wanted to Bind Property with Text block inside Header Tool tip template then how can we go.
Thanks,
Abhishek
JN
Jayaleshwari N
Syncfusion Team
January 10, 2019 10:35 AM UTC
Hi Abhishek,
Thanks for using Syncfusion Products.
We have checked the reported queries. Please find the details as following.
# Header Tool tip same as Header Text without tool tip template
You can achieve your requirement by enabling ShowHeaderToolTip for column which shows header text as the tooltip without define the tool tip template.
|
<syncfusion:SfDataGrid x:Name="sfdatagrid"
ItemsSource="{Binding YearlySalesDetails}" >
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridTextColumn MappingName="Name" HeaderText="Name of customer" ShowHeaderToolTip="True"/>
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid> |
You can refer the following user guide documentation to know about the tool tip for header cell.
# Bind Property with Text block inside Header Tool tip template
By default, DataContext of content loaded in the HeaderTootipTemplate will be associated GridColumn. You can bind any property of GridColumn to TextBlock loaded in the HeaderToolTipTemplate.
|
<syncfusion:GridNumericColumn MappingName="QS2" HeaderText="Quarterly 2" ShowHeaderToolTip="True">
<syncfusion:GridNumericColumn.HeaderToolTipTemplate>
<DataTemplate>
<TextBlock Text="{Binding MappingName}"/>
</DataTemplate>
</syncfusion:GridNumericColumn.HeaderToolTipTemplate>
</syncfusion:GridNumericColumn> |
We have attached the sample for your reference and you can download the same from the following location.
Please let us know if you would require further assistance.
Regards,
Jayaleshwari N.
SIGN IN To post a reply.
- 3 Replies
- 4 Participants
-
JT Juraj Tomana
- May 15, 2014 10:23 AM UTC
- Jan 10, 2019 10:35 AM UTC