I am really exasperated about this. I have a windows forms project in which I am using UltraGrid to present and manage information. I spend a lot of time manually creating column definitions and dragging things around to get multi line layouts the way we need them.
It all works ok, until sometime for some reason I have not been able to determine, I re-open the form that has been saved in TFS, and the columns and layouts are gone. I can find them in previous versions in TFS, but the way the UltraGrid Designer creates the definitions in the form.designer.cs file is such that there is no way to bring the layouts and columns back except to manually re-create them.
Is there a way I can store these columns and layouts to a file so that when they disappear, I can just read them back from a file?
Help
Jim Frisby
Hello Jim,
You could use the 'Save()' or 'SaveAsXml()' methods on the grid's layout, like this:
ultraGrid1.DisplayLayout.Save("filename");
Please feel free to let me know if I misunderstood you or if you have any other questions.
The problem I am having is that the design time definition of the entire column and layout for the grid gets lost from the <formname>.designer.cs file. If I use "Save" at runtime, how would I get the definition back into the design files? Is that even possible?
Does "SAVE" have a complementry method "LOAD" ? If so, does it create the columns as well as the arrangement? Would I have to use one of the grids events to load them before the grid gets populated with data?
I've had this issue randomly occur to my grids in design mode. What I've done that seems to work pretty good is before entering debug mode close any forms that are in design mode. If I'm making alot of changes to the designer I also back up the files before entering debug mode.
Thanks for the suggestion, I will try that. Do you know if having a "saved" layout and restoring it at run time would restore all the defined columns and make the grid work as designed when this happens?
Yes, you could save the layouts, from the designer or via code, and load at runtime using Load or LoadFromXml
FlyingJ said:I was able to combine the .rar files and view the video with 7zip.
Please download all parts from the video file in one folder and then try to Extract the content using RAR. I splite the video file, because it is too big to upload it.
If you have any problems, please write me, I`ll try to find another solution.
Regards
Hello FlyingJ,
As far as I know it is not possible to extract the these columns from your grid and import it into another grid, but maybe one possible solution could be if you are using UltraDataSource to create your columns with appropriate column`s key and then you could use this UltraDataSource (this datasource will be empty, without data) for all your grids.
Let me know if you have any questions.
I was able to combine the .rar files and view the video with 7zip.
I am trying to open the .rar files with 7Zip, it says the .avi files included are "broken". What tool do you recommend for extracting these videos?
Thanks for your reply. I am using only unbound columns in this example. I was under the impression that the wizard was able to save and import both the unbound columns and the layout. Is there a way to save unbound columns in from one grid and then import them into another grid?