在PropertyGrid中显示Combobox

编程入门 行业动态 更新时间:2024-10-25 14:29:05
本文介绍了在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

本文发布于:2023-11-12 12:48:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1581535.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:PropertyGrid   Combobox

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!