Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to replace the default Filter Popup with a custom one made with ASPxGridView control

$
0
0

This example demonstrates how to replace the default Filter Popup with a custom one made with the ASPxGridView control. This solution demonstrates only a basic approach, and it is possible to customize it further to achieve a custom result. The whole sample functionality can be divided into three parts:

1. We use the ASPxPivotGrid.FieldValueTemplate property to assign a custom header template. You can use a simpler sample project demonstrating this approach in the Create Header or Field Value Templates and replicate existing look-and-feel example. Note that in this example we replace the default filter button with a custom one created dynamically.


2. To get information about the filter applied to a specific field, we use the PivotGridFieldBase.FilterValues and PivotGridFieldBase.GetUniqueValues properties. To pass filter information from the server to the client, we simply convert filter values to strings. This solution can be not enough in some situations. In this case, it might be necessary to update the code accordingly.


3. To populate ASPxGridView with data at runtime and apply the specified filter to the ASPxPivotGrid control, we use the ASPxClientPivotGrid.PerformCallback and ASPxClientGridView.PerformCallback methods. The client-side row selection functionality is provided by the ASPxGridView's built-in Selection feature.


Question Comments

Added By: Nagamanickam Rajamanickam at: 1/29/2014 10:36:06 AM    

Hello Team,

We have implemented a CustomFilterPopup using this sample, but how to set this Custom Filter Popup only for one item and leave the others as default Pivot Grid Filter Popups?

Thanks
Naga

Added By: mush at: 5/7/2014 5:18:41 AM    

Hi,

I am trying to implement this approach, but Paging is not working. could you please let me know how paging will work here.

Added By: Constant (DevExpress Support) at: 5/8/2014 5:37:55 AM    

I have updated the sample project to fix the issue. The online version will be available soon. For now, you can download a temporary solution from the attachment. Please test this version and let me know of your results. 

Added By: Brunweb at: 12/17/2014 7:36:46 AM    

Hi,
i believe this example is missing some file : FilterPopup.ascx
The "FilterPopup.ascx.cs" references "ASPxGridView1" : where is it defined ? i believe in the missing file.
Please provide a full example.
thanks

Added By: Brunweb at: 12/17/2014 7:41:39 AM    

Sorry, i did not know about example runner. Found now

Added By: Brunweb at: 12/17/2014 9:07:18 AM    

Hi,
Example is really slow comared to standard filter popup, mostly because of the long time rendering in browser.
I tried from olap datasource, with about 4000 items in the list (no hierarchy) : less than 2 seconds with standard filter popup, almost 10 seconds with the example... just to load the list... maybe because of the gridview not being able to show native checkboxes.

Why isn't it possible just to be able to have some search field in the standard filter popup ?

Your example uses access DB with very fiew lines : it is OK, but in real life scenario:
- users have lots of lines
- they don't want paging (worst than all)
- they do not want to scroll a 4000 item list

I unerstant the logic would be not simple for hierarchies, but for simple items, adding a search box (with incremental search) should be possible.

Please provide an example where we can REALLY replicate existing look and feel : here, it looks same, but feeling is totally diferent, because really slow.

Thanks


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>