예제 #1
0
 public void SetGroupOn(PropertyDescriptor p)
 {
     if (p == null)
     {
         throw new ArgumentNullException();
     }
     if (groupon == null || !groupon.IsProperty(p))
     {
         GroupOn = new PropertyGrouper(p);
     }
 }
예제 #2
0
 public bool SetGroupOn(PropertyDescriptor p)
 {
     if (p == null)
     {
         throw new ArgumentNullException();
     }
     if (groupon == null || !groupon.IsProperty(p))
     {
         GroupOn = new PropertyGrouper(p);
         return(true);
     }
     return(false);
 }
예제 #3
0
 public PropertyDescriptor FindProperty(GroupingInfo gr)
 {
     foreach (PropertyDescriptor pd in cmbFields.Items)
     {
         if (gr.IsProperty(pd.Name))
         {
             return(pd);
         }
     }
     return(null);
 }
예제 #4
0
        void setprops()
        {
            if (settingvalues)
            {
                return;
            }
            settingvalues = true;
            cmbFields.BeginUpdate();
            cmbFields.Items.Clear();


            try
            {
                if (grouper != null)
                {
                    IEnumerable <PropertyDescriptor> props = grouper.GetProperties();
                    if (props != null)
                    {
                        GroupingInfo cur = grouper.GroupOn;
                        foreach (PropertyDescriptor p in props)
                        {
                            cmbFields.Items.Add(p);
                            if (cur != null && cur.IsProperty(p.Name))
                            {
                                cmbFields.SelectedItem = p;
                            }
                        }
                    }
                }
                chk.Checked = grouper != null && grouper.GroupOn != null;
            }
            catch (Exception ex)
            {
                ShowEx(ex);
            }
            settingvalues = false;
            cmbFields.EndUpdate();
        }
예제 #5
0
 public override bool IsProperty(PropertyDescriptor p)
 {
     return(Grouper.IsProperty(p));
 }