using gridx or dgrid

1617
2
Jump to solution
10-28-2014 08:38 AM
JeffreySchmidt
New Contributor II

Hopefully this is straightforward and easy to answer... I want to start using grids in my mapping applications.  Up to this point, I have only ever needed to reference the arcgis api for JavaScript...  but now I need a need another package... gridx or dgrid... and that has me confused...

My question is how to reference the ArcGIS api via http, in addition to, the dgrid or gridx components placed in the root folder of my app.... I think i need to reference the local files in dojoConfig using packages but I am not sure...

To preface: I know there is dojox grid components I could get to, but dojo is getting away from using dojox as stated on their site... http://dojotoolkit.org/reference-guide/1.10/index.html‌ and I want to as well...

So I really just need help filling in the blanks in my html below... that will get me going... the red areas are what I think I need, but I dont know how to implement... (The actual building of the grid components seems easy to implement... its simply referencing the right sources that is boggling me... even when it is laid out in from of me like: https://github.com/oria/gridx/wiki/Create-the-Simplest-Gridx

<html>

<head>

<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.11/js/dojo/dijit/themes/claro/claro.css">

<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.11/js/esri/css/esri.css">

<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.11/js/dojo/dijit/themes/claro/document.css">

<link rel="stylesheet" type="text/css" href="your/path/to/gridx/resources/claro/Gridx.css">

<link rel="stylesheet" type="text/css" href="mymap.css">

<script type="text/javascript">var dojoConfig = {async: true, packages: [???]};</script>

<script type="text/javascript" src="http://js.arcgis.com/3.11"></script>

<script type="text/javascript" src="mymap.js">

require(["dojo/parser", "esri/map", "dojo/store/Memory", "gridx/core/model/cache/Sync", "gridx/Grid", "dojo/domReady!"],

function(parser, Map, Memory, Cache, Grid) {

      //parser.parse(); //for declarative widgets

      //the rest of the map code...    

});

</script>

</head>

...

</html>

Thanks for the help!

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

This sample shows the style sheets that are required when using a dGrid. It doesn't require any extra packages, since dGrid is included in the JavaScript API (see the What's New page to see which version of dGrid is included with the API version).

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

This sample shows the style sheets that are required when using a dGrid. It doesn't require any extra packages, since dGrid is included in the JavaScript API (see the What's New page to see which version of dGrid is included with the API version).

JeffreySchmidt
New Contributor II

Thanks Ken Buja!  I did not realize dgrid was already included and a sample created...

0 Kudos