Hi,
I am trying without success to serialize the grid's settings using the SaveLayout function.
I call SaveLayout in the FormClosing event. The exception is always the same, and reproducable on different machines and different (sample) projects.
The Argument exception i get is:
The name '(default)' contains characters that are not valid for a Culture or Region. Parameter name: name
which is thrown:
at System.Globalization.CultureTableRecord.ValidateCulturePieceToLower(String testString, String paramName, Int32 maxLength)
My CurrentCulture and my CurrentUICultrue are both "en-US". I was able to make the SaveLayout() work in a sample app that I created from scratch, with nothing in it, no data, no databinding.
However, in my main application, where I add columns programatically, and databind to a Bindingsource, I get this exception. I have been able to remove all properties set in the .designer.cs file so that only the very default settings are used when calling SaveLayout. It seems that if I do NOT add any columns at all to the grid, the SaveLayout() does not throw the exception (but nothing is saved because there is nothing to save, I guess? The resulting XML file is empty save a root node <RadGridView/>). As soon as I add one single column -- which in my case id done during Form.OnLoad -- the exception is thrown.
My grid is readonly, and filtering, grouping is turned off. Editing/deleting rows is done programmatically. There is no context menu, etc. The only thing the user can do, really, is 1.) sort and 2.) change the column widths.
I can reproduce the error with having the Telerik DLLs locally (CopyLocal=true), as well as referencing them in the GAC.
I can reproduce this with 2009 Q1 SP1 and 2009 Q2. My subscription expired before I could test with Q2 SP1.
Any idea?
Thanks.
I am trying without success to serialize the grid's settings using the SaveLayout function.
I call SaveLayout in the FormClosing event. The exception is always the same, and reproducable on different machines and different (sample) projects.
The Argument exception i get is:
The name '(default)' contains characters that are not valid for a Culture or Region. Parameter name: name
which is thrown:
at System.Globalization.CultureTableRecord.ValidateCulturePieceToLower(String testString, String paramName, Int32 maxLength)
My CurrentCulture and my CurrentUICultrue are both "en-US". I was able to make the SaveLayout() work in a sample app that I created from scratch, with nothing in it, no data, no databinding.
However, in my main application, where I add columns programatically, and databind to a Bindingsource, I get this exception. I have been able to remove all properties set in the .designer.cs file so that only the very default settings are used when calling SaveLayout. It seems that if I do NOT add any columns at all to the grid, the SaveLayout() does not throw the exception (but nothing is saved because there is nothing to save, I guess? The resulting XML file is empty save a root node <RadGridView/>). As soon as I add one single column -- which in my case id done during Form.OnLoad -- the exception is thrown.
My grid is readonly, and filtering, grouping is turned off. Editing/deleting rows is done programmatically. There is no context menu, etc. The only thing the user can do, really, is 1.) sort and 2.) change the column widths.
I can reproduce the error with having the Telerik DLLs locally (CopyLocal=true), as well as referencing them in the GAC.
I can reproduce this with 2009 Q1 SP1 and 2009 Q2. My subscription expired before I could test with Q2 SP1.
Any idea?
Thanks.