تمكين تصميم الدعم الوقت لتحكم العضو في Visual Studio 2008
-
22-08-2019 - |
سؤال
ولقد خلق usercontrol GridEx: UserControl. على أن تحكم I مبيكى GridControl (DevExpress تحكم DataGrid). لقد خلق الملكية 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
والحل يمكن أن تقوم هنا:
نصائح أخرى
وحاول استخلاص تحكم المستخدم من تحكم شبكة DevExpress بدلا من فئة "UserControl".
لا تنتمي إلى StackOverflow