datagrid - dojo ContentPane OnMouseOut can"t work well -
the code below
the problem contentpane html content cannot close when mouse move out of cell filled name field of grid.
var mycontentpane; grid.on("cellmouseover",function(evt){ var cell=evt.cell; rowdata=grid.getitem(evt.rowindex); if(cell.field=="name"){ require([ "dojox/layout/contentpane", "dijit/popup" ], function(contentpane, popup){ if(mycontentpane){ popup.close(mycontentpane); } mycontentpane = new contentpane({ style: "width:300px;background:#dddddd", content:"html content string has links in it", onmouseleave:function(){ popup.close(mycontentpane); } }); popup.open({ popup: mycontentpane, around: dom.byid(rowdata.name), }); }); } });
hi try connect onmouseout this.
first setup contentpane :
mycontentpane = new contentpane({ id:"mycontentpane", style: "width:300px;background:#dddddd", content:"<p style='text-align:center;'>".... }, "mycontentpanediv");
the connect onmouseout:
mycontentpane.on("mouseout",function(){ //do want do; });
think should u out.
regards
Comments
Post a Comment