Does anyone have a simple example of a DojoX Grid work control?

I am trying to add a DojoX Grid control to my site, but I cannot get it to work. I would like a simple example to begin, but there seems to be nobody anywhere. These are my requirements:

  • I need an example 1.2 Grid
  • It should load the Dojo libraries from googleapis.com(or AOL servers, not the trunk code or Dojo code hosted on some private server)
  • In addition to downloading the Dojo code from a public server, all other code must be contained in an HTML page. No data loading from another URL; I am trying to get the grid to work; then I will worry about dynamically loading data.

Surprisingly, I can’t find anything that meets all three requirements. Does anything know about one?

0
source share
1 answer

Here you go:

  • Started with a standard Dojox Grid Test Page
  • Fixed CSS import a la:

    @import " http://ajax.googleapis.com/ajax/libs/dojo/1.2.3/dojox/grid/resources/Grid.css ";

  • Loaded cross-domain Dojo:

    <script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/ dojo / 1.2.3 / dojo / dojo.xd.js" djConfig = "isDebug: false, parseOnLoad: false ">

  • ... with the parseOnLoad parameter set to false.

  • An imported function that declares test_storeand gives it a name:

    loadStore = function () {// some sample data

  • It all started as soon as all dojo.required classes loaded :

    dojo.addOnLoad(function() { loadStore(); dojo.parser.parse() });

: Dojo -.

+1

Source: https://habr.com/ru/post/1702201/


All Articles