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?
maybe it is a good idear to biuld a custom user control out of the grid and place it in an own assembly. When doing this you only have to change the gridstyle only in this assembly and all dialogs that will use that control will be updated automatically after recompiling. So you can see the changes by design time.
Maybe this will help.
Kind regards,
Ralf
Jepp, that is what I've done. Created a custom control based on the UltraGrid component.
I added all of my style/behaviour definitions here, but some of them simply would not apply (for instance: the column header style)