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.
Unfortunately, activation email could not send to your email. Please try again.

Putting filter on filterbar ?

Thread ID:

Created:

Updated:

Platform:

Replies:

117817 Dec 22,2014 05:07 AM Jan 12,2015 09:28 AM WPF 6
loading
Tags: GridDataControl
Guillaume Morel
Asked On December 22, 2014 05:07 AM

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

Saravanan M [Syncfusion]
Replied On December 23, 2014 07:23 AM

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

Guillaume Morel
Replied On January 5, 2015 08:38 AM

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

Guillaume Morel
Replied On January 5, 2015 09:42 AM

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,


Saravanan M [Syncfusion]
Replied On January 6, 2015 12:17 PM

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



Guillaume Morel
Replied On January 7, 2015 04:39 AM

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

Saravanan M [Syncfusion]
Replied On January 12, 2015 09:28 AM

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



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;