本文介绍了在PropertyGrid中显示Combobox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好, 我想在ProperyGid视图中显示阵列中Opera的组合框: 这是我的代码: 我的物业类
Hello, I want to display a combobox of the Operants in the array in the ProperyGid view: Here is My Code: My Property Class
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; namespace AA { public class ParameterProperty { [Category("Parameter Info"), ReadOnlyAttribute(true)] public string Query_ID { get; set; } [Category("Parameter Info"), ReadOnlyAttribute(true)] public string Parameter_Name { get; set; } [Category("Parameter Info"), ReadOnlyAttribute(true)] public bool Required { get; set; } [Category("Parameter Info"), ReadOnlyAttribute(true)] public string Parameter_ID { get; set; } [Category("Parameter Info"), ReadOnlyAttribute(true)] public int Identity { get; set; } [Category("Display")] public int Sequence { get; set; } [Category("Display")] public string Label { get; set; } [Category("Data")] public string Datatype { get; set; } [Category("Data")] public string Value_1 { get; set; } [Category("Data")] public string Value_2 { get; set; } [Category("Data")] public string Operant { get; set;} public string[] _Operants = new string[] { "=", ">", "<", "!=" }; } }这个我如何加载我的ProperyGrid来自
This How I load Load The ProperyGrid on my from
ParameterProperty p = new ParameterProperty(); string s = row["Required"].ToString(); p.Query_ID = "A"; p.Parameter_ID = 1; p.Sequence = 1; p.Parameter_Name = "A"; p.Value_1 = "A";; p.Operant = "A"; p.Value_2 = "A"; p.Identity = 1 propertyGrid1.SelectedObject = p;推荐答案
我使用了枚举类型Conveter类 I Used a enum Type Conveter class
更多推荐
在PropertyGrid中显示Combobox
发布评论