GoGrid (Rack Shelf) re Planogrammer

Trying to understand the Planogrammer example in the 2.4 Beta. The whole idea of a snap to grids racks and shelves is extremely handy… I’m retrofitting old Go code to use GoGrid to visually represent and drag drop Server Racks and Blade enclosures (multiple blades in variable size rack levels) with “snap to” characteristics.
Any idea of the best way to have a Grid contain other Grids plus racks and shelves?
As 2.4 settles in any additional GoGrid examples would be welcomed.
Joe Licata

Sure, that’s easy–you just need to remove the tests for Shelf and/or for Rack in the methods OnEnterLeave (for continuous feedback) and OnSelectionDropped (for actually adding the dropped objects).
I’ll add a predicate to the Rack and Shelf classes. For example, Rack will have:
public virtual bool IsAddable(GoObject obj) {
return !(obj is Rack) && !(obj is Shelf);

Cool! Thanks

It turns out that the beta versions of the Planogrammer sample application were not designed to be modified to easily support arbitrary nesting of “containers”.
The Planogrammer sample that ships with 2.4.1 has been reorganized so that such modifications can be done easily. Much of the common code between the Rack and Shelf classes is now in a common base class called Display.
To support nesting of containers, you just need to modify or override Display.IsAddable and modify or delete the overrides of GoGrid.CanSnapPoint for RackGrid or ShelfGrid.

Thanks… much nicer!