Hi there,I have grid with a specific display style (columns, rows, colors ect). I would like to use the same style on all my grids, so I currently have a layout file that I apply to all new grids. The problem here is, that each time I change something in the layout, I have to first export the layout file, and then apply the new layout file to all my grids. Is there a way to do this easier\better?
I would like that each time I add a grid, the style is applyed automaticly. I tried doing that in my UltraGrid component, by changeing the Apperance properties, but some of them just would not change.
Thanks in advance
Hi,
I'm not sure a Layout file is the right way to go here. A layout is tied to the data structure, so it will only work for grids that are all bound to the same data source. Maybe that's not a problem in your situation, but you should be aware of it.
Another option you might consider is using a Preset. The Presets can be managed from within the grid designer. They are independent of data structure. And I beleive there is a way within the designer to specify the default preset file that all new grids you create will use.
You would still have to save the preset file when you make a change and update any existing grids, but it would handle new grids created at design-time.
Thanks for your reply,
I've tryed the Presets and they work great. but the problem is that if I change the preset, I need to apply the changes to all grids in the application, that's a lot of work :)
I would like to to the change at one place so that it applys to all my grids. Is that possible?
And how do I use the presets so that everyone in our project can use the same preset for their grids?
I don't know of any easier way.
You could load the preset file at run-time instead of Design-time. That way, you would not have to update each grid individually. You would just need to save the preset file and distribute it to the other developers.
Y'know... another thing you might consider is using Application Styling. You could style not just your grids but your whole application. Then you would just need one line of code in the app to load the style library and it would apply to all grids.