Hi, how can I define my own expand and collapse images for webdatatree, instead of the default Infragistics images?
You can add client events for initialize, expand and collapse node like this:
var j = $(".igdt_NodeHolder img:first-child").each(function (a, img) { var attr = $(img).attr("idx") if (attr == "1") { $(img).attr("class", "collapsed"); } else if (attr == "2") { $(img).attr("class", "expanded"); } else { $(img).attr("class", "leaf"); }
});
Also, add css classes to your stylesheet:
.ig_Control.igdt_Control .igdt_NodeHolder .expanded{ width:0px; height:0px; padding: 5px 5px 6px 6px; margin-right:4px; background:url('../Images/icons/collapsenode.png');}.ig_Control.igdt_Control .igdt_NodeHolder .collapsed{ width:0px; height:0px; padding: 5px 5px 6px 6px; margin-right:4px; background:url('../Images/icons/expandnode.png');}.ig_Control.igdt_Control .igdt_NodeHolder .leaf{ display:none;}
Hi,
you have to replace the images in the webdatatree.css file for each theme with similarly sized images. You can determine the image names by viewing the page source.
Thanks,
Lubomir