Пример #1
0
        private void FlexGrid_Loaded(object sender, RoutedEventArgs e)
        {
            foreach (Column column in flexGrid.Columns)
            {
                // hide calculated columns
                if (column.ColumnName.Equals("CustomField1") || column.ColumnName.Equals("CustomField2"))
                {
                    column.Visible = false;
                }
            }

            var expression = PageCache.GetCacheExpression();

            if (expression != "")
            {
                PageCache.SetCacheExpression("");
                _editor.Expression = expression;
                _editor.DataSource = flexGrid.CollectionView.FirstOrDefault();
                if (_editor.IsValid)
                {
                    ExpressionGroupDescription group = new ExpressionGroupDescription();
                    group.Expression = _editor.Expression;
                    View.GroupDescriptions.Add(group);
                }
            }
        }
Пример #2
0
 private void Editor_OkClick(object sender, RoutedEventArgs e)
 {
     if (editor.IsValid)
     {
         ExpressionGroupDescription expression = new ExpressionGroupDescription();
         expression.Expression = editor.Expression;
         View.GroupDescriptions.Add(expression);
     }
 }