Exemplo n.º 1
0
 public void SetGroupOn(PropertyDescriptor p)
 {
     if (p == null)
     {
         throw new ArgumentNullException();
     }
     if (groupon == null || !groupon.IsProperty(p))
     {
         GroupOn = new PropertyGrouper(p);
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 public PropertyDescriptor FindProperty(GroupingInfo gr)
 {
     foreach (PropertyDescriptor pd in cmbFields.Items)
     {
         if (gr.IsProperty(pd.Name))
         {
             return(pd);
         }
     }
     return(null);
 }
Exemplo n.º 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();
        }
Exemplo n.º 5
0
 public override bool IsProperty(PropertyDescriptor p)
 {
     return(Grouper.IsProperty(p));
 }