Hi,
I have question about sorting of Menu. Because I have menu with dynamic items, and I need to sort these menu items. I tried to use standard sortField and sortDirection attributes from ListGrid. It works somehow, but menu generate warning message into console:
WARN:Menu:menu:fields and completeFields are null and there is no DataSource
So I think it is not correct way, or there is bug.
You can see it on this example:
I am using SmartClient Version: v9.0p_2014-01-01
Have you any idea how to do it correctly?
Thanks.
I have question about sorting of Menu. Because I have menu with dynamic items, and I need to sort these menu items. I tried to use standard sortField and sortDirection attributes from ListGrid. It works somehow, but menu generate warning message into console:
WARN:Menu:menu:fields and completeFields are null and there is no DataSource
So I think it is not correct way, or there is bug.
You can see it on this example:
Code:
isc.Menu.create({ ID: "menu", autoDraw: false, showShadow: true, shadowDepth: 10, sortField: "title", sortDirection: "ascending", data: [ {title: "New", keyTitle: "Ctrl+N", icon: "icons/16/document_plain_new.png"}, {title: "Open", keyTitle: "Ctrl+O", icon: "icons/16/folder_out.png"}, {isSeparator: true}, {title: "Save", keyTitle: "Ctrl+S", icon: "icons/16/disk_blue.png"}, {title: "Save As", icon: "icons/16/save_as.png"}, {isSeparator: true}, {title: "Recent Documents", icon: "icons/16/folder_document.png", submenu: [ {title: "data.xml", checked: true}, {title: "Component Guide.doc"}, {title: "SmartClient.doc", checked: true}, {title: "AJAX.doc"} ]}, {isSeparator: true}, {title: "Export as...", icon: "icons/16/export1.png", submenu: [ {title: "XML"}, {title: "CSV"}, {title: "Plain text"} ]}, {isSeparator: true}, {title: "Print", enabled: false, keyTitle: "Ctrl+P", icon: "icons/16/printer3.png"} ] }); isc.MenuButton.create({ ID: "menuButton", title: "File", width: 100, menu: menu });
Have you any idea how to do it correctly?
Thanks.
Comment