Domanda

ho creato UserControl GridEx: UserControl. Su che il controllo ho putted GridControl (controllo DataGrid DevExpress). Ho creato Proprietà DataGrid che restituisce il controllo DataGrid interna (precedentemente aggiunto) Come abilitare il supporto di progettazione per DataGrid? Io cerco di mettere

[Designer("DevExpress.XtraGrid.Design.GridControlDesigner,
    DevExpress.XtraGrid.v8.2.Design", typeof(IDesigner))] 

, ma ottengo questo errore: Impossibile creare il componente 'DataGridControl'.
Il messaggio di errore seguente:

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...
È stato utile?

Soluzione 2

Solution può essere fondata qui:

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

Altri suggerimenti

Prova deriva il controllo utente dal controllo griglia DevExpress al posto della classe 'UserControl'.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top