Example #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);
                }
            }
        }
Example #2
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 != _editor.Expression)
            {
                PageCache.SetCacheExpression("");
                _editor.Expression = expression;
                _editor.DataSource = flexGrid.CollectionView.FirstOrDefault();
                if (_editor.IsValid)
                {
                    View.Filter = new Predicate <object>(Contains);
                    View.Refresh();
                }
            }
        }
 private void Editor_OkClick(object sender, RoutedEventArgs e)
 {
     if (this._backPageType != null)
     {
         PageCache.SetCacheExpression(expressionEditor.Expression);
         this.Frame.Navigate(this._backPageType);
     }
 }
        private void FlexGrid_Loaded(object sender, RoutedEventArgs e)
        {
            flexGrid.AutoSizeColumns(0, 1, 2); // adjust column sizes to reflect long headers

            var field = PageCache.GetCacheField();

            if (flexGrid != null && flexGrid.ExpressionEditors.Contains(field))
            {
                flexGrid.ExpressionEditors[field].Expression = PageCache.GetCacheExpression();
                PageCache.SetCacheField("");
                PageCache.SetCacheExpression("");
            }
        }