This project is read-only.

Dropping ListEditor on form displays error

Jan 2, 2010 at 6:49 AM

I want to use the SourceGrid planner support. But I get an error when I try to follow example 18.

When I dropped a ListEditor on a form the following error is diplayed:

Failed to create component 'ListEditor'. The error message follows:

'System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a component.

at VSLangProj.References.Add(String bstrPath)...

In the documentation was read to add these dll's:

  • DevAge.Core.dll - Helper library for common features

  • DevAge.Windows.Forms.dll - Helper library for Windows Forms

  • [SourceGrid.Extensions.dll - Optional library with some SourceGrid extensions like DataGrid, PlanningGrid]

    But I think these dll's are integrated in the sourcegrid.dll project. Is this right?

    Do I have forgot to add a reference?

    What can be wrong?

  • Jan 9, 2010 at 4:48 AM

    Depends, if you are using the new version you only need the sourcegrid dll...

    i have used a very old version the first time, and i did have to copy also those dlls too. You can solve this just trying both ways!

    Respect to the error, please give more information, what version of sourcegrid you downloaded, which visual studio version you have, etc.

    Take the documentation with tweezers, only as a guide or introduction, because was written long time ago.

    Jan 9, 2010 at 7:57 AM

    I am using version 4.22 (the new version) and Microsoft Visual C# 2008 Express Edition.

    I have downloaded the bin version of the grid (the source code too bud I get the same error)

    I have right clicked the toolbar and selected "Choose Items" to make the SourceGrid appear in the Toolbar menu.

    When I dropped the "ListEditor" or a "DevAge TextBox" to a form I get the following error:

    ---------------------------
    Microsoft Visual C# 2008 Express Edition
    ---------------------------
    Failed to create component 'DevAgeTextBox'.  The error message follows:

     'System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

       at VSLangProj.References.Add(String bstrPath)

       at Microsoft.VisualStudio.Design.VSTypeResolutionService.PerformReferenceUpdate(List`1 newReferences)

       at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.ReferenceAssembly(AssemblyName name)

       at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.ReferenceAssembly(AssemblyName name)

       at System.Drawing.Design.ToolboxItem.GetType(IDesignerHost host, AssemblyName assemblyName, String typeName, Boolean reference)

       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.Des...'
    ---------------------------
    OK  
    ---------------------------

    Jan 9, 2010 at 1:16 PM

    I do not know because SourceGrid use custom controls from DevAge instead of using Windows Forms controls.

    Try out to compiling yourself the sourcegrid dll, and if does not work, try to do the same but in another computer or visual studio instance at least.

    Jan 11, 2010 at 10:37 AM

    I usually create controls my self, without any help of designer.   You could try this ;)

    Jan 11, 2010 at 11:53 PM
    dariusdamalakas wrote:

    I usually create controls my self, without any help of designer.   You could try this ;)

    Are you talking to me? :D

     

    Jan 12, 2010 at 8:07 AM
    braian87b wrote:
    dariusdamalakas wrote:

    I usually create controls my self, without any help of designer.   You could try this ;)

    Are you talking to me? :D

     

    No :D

    That was specific for margay

    Jan 12, 2010 at 10:01 PM

    @Braian87b

    I have tried to compile the sourcegrid by my self. This was without any problems. But when I use this SourceGrid.dll in another project I still get this error.

    @ dariusdamalakas

    I will give it a try to create the control in the sourcecode. I will submit my experience.

    Mar 9, 2010 at 9:47 AM

    A possible hint on the problem:

    there seems to be a resource naming problem in ListEditor. The System.Resources.ResourceManager(typeof(ListEditor)) in InitializeComponent looks for resources with name SourceGrid.ListEditor.resources, but the actual resource name in the SourceGrid.dll (according to Reflector) is SourceGrid.SourceGrid.Extensions.ListEditor.resources.