我创建了用户控件 GridEx:UserControl。在那个控件上,我放置了 GridControl(DevExpress 数据网格控件)。我创建了返回内部数据网格控件的属性 DataGrid(以前添加) 如何启用对 DataGrid 的设计支持?我试着把
[Designer("DevExpress.XtraGrid.Design.GridControlDesigner,
DevExpress.XtraGrid.v8.2.Design", typeof(IDesigner))]
但我收到此错误:无法创建组件“DataGridControl”。
错误信息如下:
System.NullReferenceException: Object reference not set to an instance of an object.
at DevExpress.XtraGrid.Design.GridControlDesigner.Initialize(IComponent component)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design. IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel. Design.IDesignerHost.CreateComponent(Type componentType)
at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host)
at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)
at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)
at System.Windows.Forms.Design.OleDragDropHandler.Cre...