var graphic = new esri.Graphic(geometry, symbol);
map.graphics.add(graphic);
At the very least, I suspect you'll need to add that graphic to a graphicsLayer rather than the map itself. That way you'll have access to the whole layer of graphics, which you may be able to hook up to the agsjs TOC. I haven't used that myself so I'm not sure how, but hopefully this will give you some pointers.
thanks, I'll try with this method... then I'll tell you..
Have you tried by creating the blank graphicslayer and then calling the map.addlayers function to add your map service layer and graphics layers. And then initializing the TOC on onLayersAddResult event and passing the graphics layer in layer infos.
Vinay Bansal
Thanks! I'm studying this method....