示例#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 != _editor.Expression)
            {
                PageCache.SetCacheExpression("");
                _editor.Expression = expression;
                _editor.DataSource = flexGrid.CollectionView.FirstOrDefault();
                if (_editor.IsValid)
                {
                    View.Filter = new Predicate <object>(Contains);
                    View.Refresh();
                }
            }
        }
示例#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 != "")
            {
                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);
                }
            }
        }
        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("");
            }
        }
示例#4
0
        void InitalizeMobile()
        {
            var expression = PageCache.GetCacheExpression();

            if (expression != "")
            {
                c1editor.Expression = expression;
            }
            else
            {
                c1editor.Expression = "[Price] > 1000";
            }
            c1editor.DataSource = flexGrid.CollectionView.FirstOrDefault();
        }