Datagrid advanced filters & summaries setup from code behind

Posted by: philteare on 7 August 2017, 8:33 am EST

  • Posted 7 August 2017, 8:33 am EST


    normally when I use a c1datagrid I’ll add this xaml for the advanced behaviour:

                                <c1:C1GroupingWithSummariesBehavior />
                                <c1:C1AdvancedFiltersBehavior />

    Is it possible to do this from the code behind instead?



  • Posted 7 August 2017, 8:33 am EST

    Sorry, missed the code there.

    [xml] c1:C1GroupingWithSummariesBehavior.GroupingWithSummariesBehavior <c1:C1GroupingWithSummariesBehavior /> </c1:C1GroupingWithSummariesBehavior.GroupingWithSummariesBehavior> c1:C1AdvancedFiltersBehavior.AdvancedFiltersBehavior <c1:C1AdvancedFiltersBehavior /> </c1:C1AdvancedFiltersBehavior.AdvancedFiltersBehavior>[/xml]

  • Posted 7 August 2017, 8:33 am EST

    Yes, you can set enable both features using code. See below code:-

    [csharp] C1GroupingWithSummariesBehavior.SetGroupingWithSummariesBehavior(grid, new C1GroupingWithSummariesBehavior()); C1AdvancedFiltersBehavior.SetAdvancedFiltersBehavior(grid, new C1AdvancedFiltersBehavior()); [/csharp]


  • Posted 8 September 2018, 5:53 pm EST

    can we use the built-in C1AdvancedFiltersBehavior with datagridtemplatecolumns? OR use some kind of built-in header templates to get this filtering ?

Need extra support?

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

Learn More

Forum Channels