Exemple #1
0
        private FilterDescriptor GetFilterDescriptor(CompositeFilterDescriptor composite)
        {
            CompositeFilterDescriptor filterDescriptor = new CompositeFilterDescriptor();
            DataFilterGroupNode       node1            = this.radDataFilter1.DataFilterElement.Nodes[0] as DataFilterGroupNode;

            filterDescriptor.LogicalOperator = node1.LogicalOperator;
            foreach (RadTreeNode node2 in (Collection <RadTreeNode>)node1.Nodes)
            {
                DataFilterGroupNode dataFilterGroupNode = node2 as DataFilterGroupNode;
                if (dataFilterGroupNode != null && dataFilterGroupNode.CompositeDescriptor.FilterDescriptors.Count > 0)
                {
                    filterDescriptor.FilterDescriptors.Add((FilterDescriptor)dataFilterGroupNode.CompositeDescriptor);
                }
                DataFilterCriteriaNode filterCriteriaNode = node2 as DataFilterCriteriaNode;
                if (filterCriteriaNode != null && filterCriteriaNode.FilterOperator != FilterOperator.None)
                {
                    filterDescriptor.FilterDescriptors.Add(filterCriteriaNode.Descriptor);
                }
            }
            if (filterDescriptor.FilterDescriptors.Count == 0)
            {
                filterDescriptor = (CompositeFilterDescriptor)null;
            }
            else if (filterDescriptor.FilterDescriptors.Count == 1)
            {
                return(filterDescriptor.FilterDescriptors[0]);
            }
            return((FilterDescriptor)filterDescriptor);
        }
Exemple #2
0
 private void UpdateValues()
 {
     foreach (RadTreeNode node in this.radDataFilter1.DataFilterElement.GetNodes())
     {
         DataFilterCriteriaNode filterCriteriaNode = node as DataFilterCriteriaNode;
         if (filterCriteriaNode != null)
         {
             this.UpdateEditorValue(filterCriteriaNode.Descriptor);
         }
     }
 }
        public override void Synchronize(DataFilterCriteriaNode criteriaNode)
        {
            base.Synchronize(criteriaNode);
            Color color = Color.Empty;

            if (criteriaNode.DescriptorValue != null)
            {
                color = (Color)criteriaNode.DescriptorValue;
            }
            this.colorBox.BackColor = color;
        }
        public override void Synchronize(DataFilterCriteriaNode criteriaNode)
        {
            base.Synchronize(criteriaNode);
            if (criteriaNode == null)
            {
                return;
            }
            string str = criteriaNode.Descriptor.PropertyName;

            if (TelerikHelper.StringIsNullOrWhiteSpace(str))
            {
                str = LocalizationProvider <DataFilterLocalizationProvider> .CurrentProvider.GetLocalizedString("FieldNullText");
            }
            PropertyDisplayNameNeededEventArgs e = new PropertyDisplayNameNeededEventArgs(criteriaNode.Descriptor.PropertyName, str);

            this.DataFilterNodeElement.DataFilterElement.OnPropertyDisplayNameNeeded((object)this, e);
            this.Text = e.DisplayName;
        }
Exemple #5
0
        public override void Synchronize()
        {
            if (!this.IsInValidState(true))
            {
                return;
            }
            DataFilterCriteriaNode criteriaNode = this.CriteriaNode;

            if (criteriaNode.Descriptor != null)
            {
                this.FieldElement.Synchronize(criteriaNode);
                this.OperatorElement.Synchronize(criteriaNode);
                this.ValueElement.Synchronize(criteriaNode);
                if (!DataFilterOperatorContext.IsEditableFilterOperator(criteriaNode.FilterOperator))
                {
                    this.ValueElement.Visibility = ElementVisibility.Hidden;
                }
                else
                {
                    this.ValueElement.Visibility = ElementVisibility.Visible;
                }
            }
            base.Synchronize();
        }
Exemple #6
0
 public virtual void Synchronize(DataFilterCriteriaNode criteriaNode)
 {
 }