We have a custom filtering control that were using to implement server side filtering. We are not planning on using anything that does in memory filtering like the default of what the telerik filtering stuff does.
We have all of this working except that when there are no results and you click on the filter button in the column header the control doesnt show up. Is there a way to enable it where clicking the filter button in the column header always shows the control? If we can do it this way were going to have to completely write our own control that is a button with a popup below it and put them into each of the column headers.
Thanks
5 Answers, 1 is accepted
The fact whether the custom filtering control shows up should not have anything to do with whether there is data or not, but you never know. Is the Prepare method of your custom control called when the user clicks the funnel? It should be.
Could you please send us a very small dummy mock sample project that exhibits this behavior and we will immediately take a look to see what exactly is going on. The custom filtering control may be completely empty and dummy.
Thanks in advance.
Ross
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Your absolutely right. When i setup a brand new project using the default styles but with the same behavior around using a custom filter control it works even if the ItemsSource is null or has an empty collection. We must have messed something up in our styles that makes the filter button in the header not clickable when there is no data.
Thanks.
The easiest way to pinpoint the problem would be to see whether the Prepare method is called. By design this Prepare method is called every single time the user clicks on the filtering funnel. Alternatively, you can use Silverlight Spy to see what exactly happens when you click on the funnel. You can inspect the visual tree.
Let me know if I can help with anything else.
Ross
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
In this case you should compare the current state of your header cell with the default one. Here is the template structure of the header cell. The funnel responsible for showing the filtering control is called PART_DistinctFilterControl (the name is stupid I know) and is of type FilteringDropDown.
What you can do is take a default grid and your "broken" one and inspect them both with Silverlight Spy simultaneously. Compare the contents of the header cell and see where is the difference. This might help you identify where the mess up has occurred.
I hope this helps.
Ross
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>