How to show only group item in pallet & show all after drag & drop In GOJS

how to show only group item in pallet & show all after drag & drop In GOJS?

for group items picture is working well, but How to set picture in group in pallet?

Take a look at this sample: Graphical Macros via Auto Ungrouping.

But in your app you don’t need to have that sample’s “ExternalObjectsDropped” diagram listener – you can leave the group as is.

Please check the attachment.
Group is shown like that. But I want to add a picture in it. How is it possible?

Add a Picture to your template. The details depend on:

  • how big you want it to be (GraphObject.width and GraphObject.height),
  • where you want it to be relative to the other objects in the group (what Panel it is in and what panel-related properties you have set), and
  • what you want to show (set or bind Picture.source).

Some introductions to designing templates are at:

Actually I am doing a dynamically created Palette and Drag & drop into Diagram.
In Tool palette there are normal component & group component . Inside group there are many components. I can set picture all component of Tool palette, it is not affection group components. SO I need how to set group picture dynamically? I can set a single group icons to all groups. But I need to set dynamically picture to all groups.

The usual way to change the image shown by a Picture is to set the Picture.source property, or to bind the Picture.source property and set the corresponding property on the model data.

I am setting image By following code:-
$(go.Picture, {
source: image,
background: “white”,
width: 100,
height: 100
}, new go.Binding(“figure”, “figure”)),

It is working fine for single components. But is not working for groups.

Are you using go-debug.js? You really should when you are developing your app. In this case you’d get a warning about “figure” not being a defined property on the Picture class.

Your Binding should be on the Picture.source property, not on the non-existent “figure” property. Then you can just set the value of the property on the node data object when you create the group. Or call Model.setDataProperty if you want to change the value of the data property dynamically.