我已经定义了一个DataGridComboBoxColumn。想请问如何可以把DataGridComboBoxColumn作为一个组合类,自定义的DataGrid 做为控件项目封装。而不使用Form

解决方案 »

  1.   

    使用Inherited User Controlpublic class MyDataGrid : System.Windows.Forms.DataGrid
      

  2.   

    可以写得详细些吗?我不知道继承了以后怎么办?看到的例子都是写的直接使用。像:GridTableStyle.GridColumnStyles.Add(new DataGridComboBoxColumn(_CourseDT,0,0));
      

  3.   

    http://msdn.microsoft.com/library/en-us/dnaspp/html/creatingcustomcolumns.asp设计时属性还是不能支持,必须手动添加custom column