We are going to release DataView component. It provides all Folders features and even more, much more.
Here are the details: dhtmlx.com/blog/?p=279
We’ll add the onBeforeContextMenu in the official version of DataView (it will be released in several weeks). Using this event you will be able to show context menu.
I have now this issue:
I can not attach the ContextMenu to the selected DataView-Item.
I see (on the Firebug-Console) that the ContextMenu-File is fetched, but no visual appearance.
My Example-Test-Code:
var dataview = new dhtmlXDataView({
container: “idCustomerListContent”,
type: { template: “#title##author# #lprice#”, height: 35 }
});
dataview.load(“books.xml”); /* <-- default demo file in dhtmlxDataView */
dataview.attachEvent(“onBeforeContextMenu”, function(itemId,e){
var menu = new dhtmlXMenuObject();
menu.setIconsPath("…/…/…/lib/img/ico/");
menu.renderAsContextMenu();
menu.loadXML(“xml.ContextCustomer.php”);
});
You need to call showContextMenu method to display menu is a certain position. For example:
[code]var menu = new dhtmlXMenuObject();
menu.setIconsPath("…/…/…/lib/img/ico/");
menu.renderAsContextMenu();
menu.loadXML(“xml.ContextCustomer.php”);
dataview.attachEvent(“onBeforeContextMenu”, function(itemId,e){
var x = e.clientX;
var y = e.clientY;
menu.showContextMenu(x,y);
return false;
});[/code]
Also I forgot to mention that onBeforeContextMenu must return false to block browser context menu.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan