Igor. I agree - this sounds simpler than it probably is behind the scenes. But I'm thinking that a multi-dimensional array may work. Probably just the key formatting items: font name; font size; bold; italic; fore color; back color; FmtString etc. I realize this opens a can of worms because given an inch everyone would want a mile - they'd want every property. What about row height? Row visible? Column widths? I'm more thinking of things that dynamically change from code, not the original design of the grid itself. I'm sure a tree grid is even more complex.
Another thought is to have a parent/child grid relationship. A "child grid name" would be a property of a parent grid. Any change to the parent would simply be duplicated in the child grid. Autowidth column 2 in the parent and column 2 in the child also gets updated. Change the order of columns in the parent and the columns change in the child. This too could get complex. What if the grids don't match exactly? Can a change in the parent without a corresponding child element just be ignored. Using my column example, what if the parent had a column that the child didn't have? Can any change to the parent column be ignored in the child grid? In this example it would have to be by column key since column numbers wouldn't be aligned.
Maybe when you define the parent grid - columns, background color, header styles, etc. - if it has a ChildGridName the child grid inherits those same properties and you never have to define that info for the child grid. Prevents the issue of the child and parent not matching 100%. It simply forces the grids to be identical. The developer would simply place a unique grid on a form and maybe it has a property to point back to the parent as well as the parent having a pointer to the child. But that's it; no need to define any fields or features of the child grid.
Lastly, where it get really complex (I think) is functions generated from within the grid. Let's say a parent grid has a checkbox cell that, once checked, executes some code. Can I check the corresponding child checkbox and execute the same code without duplicating the code behind the checkbox? Just so you know, for my pop-out form with the duplicated grids, I severely limited functionality for this reason. I didn't want to duplicate code or do a lot of excessive coding so that each checkbox event pointed to the same block of code. I would have done that if necessary, but for my client, they didn't really need that depth of functionality on the "scoreboard" view. I dodged a bullet on the scorecard form.
On the three client grids I mentioned, there is some functionality that I did duplicate across all three grids, but that was a trade-off vs. combining all the grid functions to one block of code. Could of gone either way on this one. So on these three grids I have to always update the other two grids, no matter which grid they choose to use, so there's a bit of coding to make this all happen.
Thanks for thinking about this.