We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Putting filter on filterbar ?

Hello again,

I contact you about a functionnality I'd like in my application on WPF classic GridDataControl. The fact is I'd like to put a tooltip on the default filter bar which comes with GridDataControl, to explain users functionning of the filters. So far, I haven't been able to manage my goal. Is that possible to put a tooltip on this part? And, to customize it? If so, how should I do?

Thanks for the feedback,

Regards

6 Replies

SM Saravanan M Syncfusion Team December 23, 2014 12:23 PM UTC

Hi Morel,

 

Thank you for contacting syncfusion support,

 

We have analyzed your query. We are able to achieve your requirement by setting Tooltip for FilterBarCell in QueryCellInfo event also ensure that ShowTooltip to True . Please refer the below code snippet.

 

Code Snippet[C#]:

  void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)

  {

    if (e.Style.CellType=="FilterBarCell")

    {

      e.Style.ShowTooltip = true;

     e.Style.TooltipTemplate = App.Current.FindResource("FilterBarTooltip") as DataTemplate;

    }

  }

 

 

We have prepare a sample based on this and you can download it from the below attachment .

 

Please let us know if you have any queries,

Regards,

Saravanan.M


Attachment: GridDataControl_TooltipFilterBar_7a897a97.zip


GM Guillaume Morel January 5, 2015 01:38 PM UTC

Thanks for the answer Saravan. The solution works to put a custom tooltip on the filter bar.

However, my app uses syncfusion's SkinStorage to define styles (the metro one). As so, tooltips through the app have the style defined in it. The tooltip i set on the filter bar with your workaround doesn't inherit this style, as it seems not to be in the visual tree. Any idea on how i could fix that?

Regards


GM Guillaume Morel January 5, 2015 02:42 PM UTC

Update :

- I also tried using property ToolTip on the style and setting a string in it, the tooltip appears with the default wpf tooltip look and feel.
- When i set a tooltip object wether directly in the ToolTip property, or in a DataTemplate set in TooltipTemplate property, it crashes with an exception "'ToolTip' cannot have a logical or visual parent."

Regards,



SM Saravanan M Syncfusion Team January 6, 2015 05:17 PM UTC

Hi Morel,

We have checked with our side. We can get the style from DataTemplate and it applied to the TooltipTemplate while using Metro style. We have modified the sample and you can download it from below location.

Sample: GridDataControl_TooltipModified.zip

If this is not your requirement , could you please modify the sample based on your requirement and share the more details with your query?

Please let us know if you have any other queries,

Regards,

Saravanan.M




GM Guillaume Morel January 7, 2015 09:39 AM UTC

Hello again Saravanan, and thanks for the answer.

Unfortunately, your sample doesn't meet my requirements. I modified the sample and joined screenshots so you can see what i'm trying to achieve.

I have added a default tooltip on column headers. Just setting the text, and without customizing anything, this tooltip takes syncfusion's metro style, as you can see in attached screenshot expected_tooltip.png. But on the filter bar the tooltip doesn't inhenrit this style and only takes the background set in your datatemplate as you can see in actual_tooltip.png. If you don't set background, the tooltip is even background free (and style free), as you can see in uncustomized_tooltip.png.

Actually, the last sample you sent me was pretty much the same as the first one. Maybe a bad file?

Regards

Attachment: tooltip_1ba340f5.zip


SM Saravanan M Syncfusion Team January 12, 2015 02:28 PM UTC

Hi Morel,

We are sorry for the inconvenienced,

We have analyzed your query. We could not set the VisualStyle for FilterBar Tooltip .Custom Tooltip does not inherits the style from VisualStyle. We have to modify the styles based on the Visual Style . You can set the Custom Tooltip in TooltipTemplate property not in default Tooltip property.

Please let us know if you have any other queries,

Regards,

Saravanan.M



Loader.
Live Chat Icon For mobile
Up arrow icon