How to show refreshed tooltip data with a column template in the Blazor DataGrid?

Answer:

Set the @key directive attribute in the SfTooltip component to refresh and show the Tooltip data in the Blazor DataGrid column.

<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" IsPrimaryKey="true" TextAlign="@TextAlign.Center" Width="140">

<Template>

@{

var ctx = (context as Order);

Count++;

<SfTooltip @key="@Count">

<TooltipTemplates>

<Content>

@ctx.OrderID

Content>

TooltipTemplates>

<span>@ctx.OrderIDspan>

SfTooltip>

}

Template>

GridColumn>

@code{

int Count { get; set; } = 0;

}


Please find the sample to show refreshed tooltip data after sorting a column with a column template in Blazor DataGrid here.


2 Replies

JC Joan Carles Ferran August 2, 2021 08:38 AM UTC

Hi,

Did you find any other solution to this problem? 

Because if you want the tooltips in all the columns (in our case 8 columns) the performance is terrible and we have only 10 records in the grid....


Thanks in advance.

Best Regards,



VN Vignesh Natarajan Syncfusion Team August 3, 2021 03:08 AM UTC

Hi Joan,  
 
Thanks for contacting Syncfusion support.  
 
Query: “Because if you want the tooltips in all the columns (in our case 8 columns) the performance is terrible and we have only 10 records in the grid.... 
 
Currently we do not have support to display the tooltip in Grid column without using template. We have already considered this requirement as a feature at our end and we logged “Need to display Tooltip in Grid content and Header without templates” as feature to our feature table. Thank you for requesting this feature and helping us define it.   
 
We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. It will be implemented in any of our upcoming releases.   
  
You can also communicate with us regarding the open features any time using our Feature Report page.     
     
 
Till then we suggest you to use the solution provided in previous update.   
 
Regards, 
Vignesh Natarajan 
 
 


Loader.
Up arrow icon