コード例 #1
0
        // show only blue products
        void _btnBlue_Click(object sender, RoutedEventArgs e)
        {
            // get grid filter
            var f = C1FlexGridFilterService.GetFlexGridFilter(_flex);

            // customize color column filter
            var c = _flex.Columns["Color"];
            var cf = f.GetColumnFilter(c);
            if (cf != null)
            {
                cf.ConditionFilter.Clear();
                cf.ValueFilter.Values = new string[] { "Blue" };
            }

            // apply changes
            f.Apply();
        }
コード例 #2
0
        // show only expensive products
        void _btnExpensive_Click(object sender, RoutedEventArgs e)
        {
            // get filter
            var f = C1FlexGridFilterService.GetFlexGridFilter(_flex);

            // customize price column filter
            var c = _flex.Columns["Price"];
            var cf = f.GetColumnFilter(c);
            if (cf != null)
            {
                cf.ValueFilter.Clear();
                var c1 = cf.ConditionFilter.Condition1;
                c1.Operator = ConditionOperator.IsGreaterThanOrEqualTo;
                c1.Parameter = 900.5;
            }

            // apply changes
            f.Apply();
        }
コード例 #3
0
 void _btnSave_Click(object sender, RoutedEventArgs e)
 {
     var f = C1FlexGridFilterService.GetFlexGridFilter(_flex);
     _filterDef = f.FilterDefinition;
 }
コード例 #4
0
 // toggle ICollectionView vs Row.Visible modes
 void _chkCollectionView_Click(object sender, RoutedEventArgs e)
 {
     var f = C1FlexGridFilterService.GetFlexGridFilter(_flex);
     f.UseCollectionView = _chkCollectionView.IsChecked.Value;
 }
コード例 #5
0
 // clear filters
 void _btnClear_Click(object sender, RoutedEventArgs e)
 {
     var f = C1FlexGridFilterService.GetFlexGridFilter(_flex);
     f.Clear();
     f.Apply();
 }
コード例 #6
0
 // load filter definition
 void _btnLoad_Click(object sender, RoutedEventArgs e)
 {
     var f = C1FlexGridFilterService.GetFlexGridFilter(_flex);
     f.FilterDefinition = _filterDef;
     f.Apply();
 }