private void PropertyGridTempleteSetting_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) { string label = e.ChangedItem.Label; //((System.Windows.Forms.PropertyGridInternal.PropertyDescriptorGridEntry)e.ChangedItem).Label; if (label.Equals("ProjectName", StringComparison.OrdinalIgnoreCase)) { PropertyGridTempleteSetting.SelectedObject = properties; PropertyGridTempleteSetting.ExpandAllGridItems(); } }
private void RefreshProperties() { lblTemplate.Text = _TemplateSettingObject.FileName; properties = new GenericPropertyCollection_CustomTypeDescriptor(); properties.AddProperty(new GenericProperty("Projects", _TemplateSettingObject.Project, "1- Projects", "")); properties.AddProperty(new GenericProperty("Others", _TemplateSettingObject.OthersSettings, "2- Back", "")); properties.AddProperty(new GenericProperty("Methods", _TemplateSettingObject.Methods, "2- Back", "")); properties.AddProperty(new GenericProperty("MethodsName", _TemplateSettingObject.MethodsName, "2- Back", "")); properties.AddProperty(new GenericProperty("StoreProcedures", _TemplateSettingObject.StoreProcedures, "2- Back", "")); properties.AddProperty(new GenericProperty("Entities", _TemplateSettingObject.Entities, "3- Common", "")); PropertyGridTempleteSetting.SelectedObject = properties; PropertyGridTempleteSetting.ExpandAllGridItems(); }