如果有在PropertyGrid中用下拉框的朋友有困难的,请参见下面。并希望高手提出意见,
说明:下面的代码是不能run的。这是直接copy了我的东西,想用的朋友,需要修一些地方.
using System;
using System.Text;
using System.Reflection;
using System.Collections;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Data;
using System.Drawing;
using System.Drawing.Design;
namespace Com.WorkFlowEnginer.Entity
{
#region 对象下来列表控建[Role]
//对象选择下拉列表转化
public class DropDownListRoleConverter : System.Drawing.Design.UITypeEditor
{
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return System.Drawing.Design.UITypeEditorEditStyle.DropDown;
}
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
System.Windows.Forms.Design.IWindowsFormsEditorService iws = (Sys