我已经创建用户控件当Gridex:用户控件。 在那个控制我的推杆GridControl(DevExpress的DataGrid控件)。 我创建了房产数据网格,其内返回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...
有帮助吗?

解决方案 2

解决方案可以在这里成立:

http://www.devexpress.com/kb=A577

其他提示

尝试导出从电网DevExpress的控制,而不是“用户控件”类的用户控制。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top