We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error in designer code generation

Thread ID:

Created:

Updated:

Platform:

Replies:

23968 Jan 26,2005 08:48 AM UTC Feb 6,2005 08:45 PM UTC WinForms 10
loading
Tags: GridControl
Holger Persch
Asked On January 26, 2005 08:48 AM UTC

Hi, I''m getting the following error message after modifying a form containing a Essential Grid: Code generation for property ''RowHeightEntries'' failed. Error was: ''Key cannot be null. Parameter name: key'' Code generation for property ''ColWidthEntries'' failed. Error was: ''Key cannot be null. Parameter name: key'' Code generation for property ''ColHiddenEntries'' failed. Error was: ''Key cannot be null. Parameter name: key I''m using Essential Suite version 3.0.1.1, but the forms were already created with earlier versions. Any help? Regards, Holger Persch

Administrator [Syncfusion]
Replied On January 26, 2005 08:54 AM UTC

Try this. Before modifying the old form, click the grid on the design surface, and then click the Touch It verb under the grid''s propertygrid. Next close the form in the designer. Then reopen the form and try to make your change.

Holger Persch
Replied On January 26, 2005 09:38 AM UTC

It doesn''t help. After clicking the "Touch it" link the form gets modified and I need to save before closing it. During saving, when the "InitializeComponent" code is rewritten, the errors are appearing again. Another question: What is the funtion behind the "Touch it" link? Regards, Holger Persch

Administrator [Syncfusion]
Replied On January 29, 2005 06:49 AM UTC

Here is the code behind the Touch It verb in the GridControlDesigner class (which is internal). It just triggers a rewrite of the code. private void OnTouchAndSave(object sender, EventArgs args) { GridControlBase grid = this.Control as GridControlBase; if (grid != null) { IDesignerHost host = this.GetService(typeof(IDesignerHost)) as IDesignerHost; this.BroadcastComponentChanged(); grid.Invalidate(); } } As far as the error, did you run the ConvertResx utility to move these 2.x resx files up to 3.0.1.0?

Administrator [Syncfusion]
Replied On January 30, 2005 06:34 PM UTC

Holger, this sounds like a bug in the ColWidthEntries and RowHeightEntries collection that must be somehow related/triggered by the the original data from the resx file. Can you send us the resx file - we can then try to create a small sample that tries to load and convert it. Or if you have a sample project that worked in 2.x and now gives you trouble with converting the resx that would be even better. Thanks, Stefan

Holger Persch
Replied On February 1, 2005 05:22 AM UTC

There seems to be a problem with uploading files to your site. I''m not able to upload the resx file, neither in the forum nor in DirectTrac. Regards, Holger Persch

Holger Persch
Replied On February 1, 2005 07:55 AM UTC

File upload works now. I attached a resx file containing a grid that produces these errors. Regards, Holger ExplorerDynamicRelationTypesView_2774.zip

Holger Persch
Replied On February 3, 2005 04:36 AM UTC

Any news here? Should I create a DirectTrac incident? Regards, Holger

Administrator [Syncfusion]
Replied On February 3, 2005 01:53 PM UTC

Holger, The resx didn''t give much clues so far. It looks like you are actually not doing any formatting for the grid that is stored in the form, correct? How do the lines of code in your form look like that initialize the grid. Are there any code statements that try to initialize ColWithEntries, RowHeightEntries etc? Right now my guess is that you somewhere in your form have statements like this: resources.GetObject("gridControl.RowHeightEntries") and that fails then. Could that be it? Do you also have the old resx file before it was converted to 3.0.1.1? Stefan

Holger Persch
Replied On February 4, 2005 01:46 PM UTC

Hi Stefan, I''m sorry the resx file I attachted here doesn''t contains formating code because it''s from an inherited user control and all the fomatting is done in the base control. I now have attached two resx files, a non converted file (pre 3.0.1.1) and a converted file. Hope this helps. I searched for the "RowHeightEntries" statement in all code files. I found out that all the forms and controls, containing a grid that produces these errors, doesn''t contain statements like this. All forms that are working well do contain this statement. How can we proceed? Regards, Holger ExplorerGridView_926.zip

Administrator [Syncfusion]
Replied On February 6, 2005 08:45 PM UTC

Hi Holger, your old resx does not contain any entries for the RowHeights, ColWidths, HideCols nor HideRows (that''s how row heights and column widths were persisted prior to 3.0). Therefore, there should be no row height entries and column width entries be generated for your form. I don''t understand why these collection are created in your case (it is really hard to find out without a sample project). What I suggest it you simply delete those lines from your form that cause problems after you converted the form since you have no custom row heights / column widths in your grid. Stefan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;