在控件中定义枚举类型的属性
   public enum dtablestateselect 
   { 
   showaddnew = 1, 
   saveaddnew = 2, 
   showedit = 3, 
   saveedit = 4, 
   delete = 5, 
   show = 6, 
   list = 0 
   } 
   
   
   private dtablestateselect _dtablestate; //定义类的私有变量,变量的类型为上面定义的枚举 
   
   public dtablestateselect dtablestate //定义属性,变量的类型为上面定义的枚举 
   { 
   get 
   { 
   return _dtablestate; 
   } 
   set 
   { 
   _dtablestate = value; 
   } 
   } 
   
   
  在页面设置控件的枚举类属性 
   
  dtable1.dtablestate = dtablecontrol.dtable.dtablestateselect.list; 
   
  当然,也可以在设计界面的属性栏直接选择属性的不同类型 
新闻热点
疑难解答