Login Register

json store

Grid - Status of checkbox from a JSON store

A few days ago I started working with the Dojo toolkit and most things work out fantastically for me.

I'm using the Grid and populated it using a JSON-store (created from an MySQL-database using PHP). So far, so good. There are several boolean-fields; their values (in the JSON-file) are either '0' or '1'.

How can I get the dojox.grid.editors.bool-editor to work with these values? I don't want to change the database values from 1 to e.g. 'checked'.

Using

view layout and data from the same json store

Hello Guys,

I want to have a dynamic view layout that should be defined in the same store as the data is. I first tryed the sample below with the view layout defined in the js-file. This works fine.

var store;
var ddata;
var grid;
var view1 = {
cells: [[
{name: 'name', field: "name"},
{name: 'vorname', width: "25em", field: "vorname"}
],
[

Combobox and JSON Store

End Result: A combo box that gets populated from sql

I have been trying to follow the example that is given in the documentation section for creating a combo box whose values are populated from a json store. In my html file, I have put up what was shown in the documentation:


<div dojoType="dojo.data.ItemFileReadStore" jsId="stateStore"
              url="response.php"></div>
             
     <input dojoType="dijit.form.ComboBox"
                store="stateStore"

Syndicate content