C1GridView Filtering with EntityDataSource

Posted by: astarte on 10 September 2017, 11:38 am EST

  • Posted 10 September 2017, 11:38 am EST

    I have a project with MVC and EF - I realise that MVC is not currently supported by C1, but I still need to present a grid bound to the related Entities using EntityDataSource.



    The basic view, Sorting, Paging work nicely - but Filtering does not. The filtering event is fired, and the C1GridViewFilterEventArgs is populated correctly - however, the view is not filtered and the query sent to the SQLServer is unchanged.


    A workaround could be to do a custom filter and apply to the Where property of the EntityDataSource - but the main benefit of using C1GridView is that all the work of generating a suitable filter expression is done by the Grid. Is there another way to extract the where clause that should have been applied?


     


    Thanks,


     


    Dave.


     

  • Replied 10 September 2017, 11:38 am EST

    Hi,


    Automatic filtering is only supported for datasources which can be represented as System.Data.DataView.


    In your case you need to create a Filtering event handler and implement code there which filter your datasource.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels