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

GridView - How to filter Chart data based on the grid filter

$
0
0

This example illustrates how to display only those data rows in the Chart extension, which are displayed in the GridView extension according to its current filter state (e.g., see Filter Row - ASP.NET MVC Extensions - Grid View Demo). Unlike the approach illustrated in the T177863 - ASPxGridView - How to make WebChartControl display only data that is visible in grid code example (for the WebForms platform), we use filtering at the database level to display data in a Chart. Note that the sorting order is not retained in this scenario, but the performance is much better for large data sources. The key idea here is to use the CriteriaToWhereClauseHelper class method to convert the ASPxGridView.FilterExpression property value to the database-specific filter query. Please review the K18434 - How to convert the CriteriaOperator to the corresponding filter string in order to use it for building SQL queries or for filtering the DataView and A2921 - How to get a list of the data rows in a filtered grid KB articles to learn more on this subject.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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