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