go.Group layout binding

Hi everyone, I am trying to use binding to select dynamically which layout to apply to group nodes depending on node “colSize” property. However it does not seem to work and the layout is not displayed
If I set it statically (commented line), it is displayed correctly, any ideas ?

var threeColLayout = t(go.GridLayout,
wrappingColumn : 3,
cellSize : new go.Size(50, 10),
isRealtime: true }

        myDiagram.groupTemplate =
            t(go.Group, "Auto",
                resizable: true,
                resizeObjectName: "PANEL",
                defaultAlignment: go.Spot.Center,
                locationSpot: go.Spot.Center,
                margin: 0,
                stretch: go.GraphObject.Fill,
                //layout: threeColLayout
                new go.Binding("layout", "colSize", function(c) {
                    return threeColLayout;

Your binding coversion function does not depend on the data.colSize value, so I am not surprised that you do not see any different layout results. But you have the right idea. I suggest that you implement something like:

    new go.Binding("layout", "colSize", function(c) {
      return t(go.GridLayout,
          wrappingColumn: c,
          cellSize: new go.Size(50, 10),
          isRealtime: true

Thanks for your reply, it works very well