<script type="text/javascript"> var locationPathname = location.pathname.replace(/[^\/]+$/, ''); var dojoConfig = { async: true, locale: "fr", // [YB 2013/08/08 : This will make dijits use french] packages: [ { name: "viewer", location: locationPathname + "js/viewer" }, { name: "gis", location: locationPathname + "js/gis" }, { name: "put-selector", location: locationPathname + "js/put-selector" }, // xstyle & dgrid dependency { name: "xstyle", location: locationPathname + "js/xstyle" }, // dgrid dependecy { name: "dgrid", location: locationPathname + "js/dgrid" } ] }; </script>
// Create a new dgrid constructor by mixing in the optional components we want to add var CustomGrid = declare([ OnDemandGrid, Keyboard, Selection ]); this.store = new Memory({ idProperty: "code", data: [] }); this.grid = new CustomGrid({ columns: { color: "", rank: "Rang", label: "Territoire", value: "Nombre" }, store: this.store, selectionMode: "single", // for Selection; only select a single row at a time cellNavigation: false // for Keyboard; allow only row-level keyboard navigation }, "exploreSecteurActivite-grid"); this.grid.on("dgrid-select", lang.hitch(this, this.onGridSelect)); this.grid.on("dgrid-refresh-complete", lang.hitch(this, this.onGridRefreshComplete));
// Update the grid this.store.setData(data); this.grid.refresh();
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.