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?
After upgrading my project to v 12.2, lI still don't get a useful restore of the layout or column definitions:
Original layout:
Restored to second form's ultragrid as:
Don't know what is wrong. Maybe I can hope that the 12.2 version will no longer spontaneously dispose of my layouts
is there a way I can send you the .lyt file that was generated when I saved the layout to file?
Jim
Please archive it(as zip if possible) and attach it to your next post. When writing it, please go to 'Options' tab above and click on the 'Add/Update' button, browse for your file.
Here is the layout file, along with the form from which it was created. The test was done with the grid on the "consequences" tab, named "ugLocations".
Hello,
Using this file I was not able to get any columns. I know that there was such an issue but it has already been fixed. So this must be another issue. I need to have a sample which reproduces this every time so I could ask our enginnering staff about this behavior. I might need your datasource as well, I really do not know how exactly to reproduce this.
Thanks for your continuing attention to this problem. I have created a stand-alone solution in VS 2010 which demonstrates the problem (see zip file). In this instance, Form1 contains the defined grid. I produced this grid layout by copy/paste from my actual project. Form2 contains the result when I use the wizard to export the grid from form1 and import it to form 2. In the zip file I have also included the intermediate .lyt file used in this instance.
You should be able to open the solution, create a new form and try importing the .lyt file into a grid, and also use the wizard on form1 to export the grid layout and try importing that resulting .lyt file.
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?