1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
   | <script>
        dojo.require("dojo.data.ItemFileReadStore");
        dojo.require("dijit.form.ComboBox");
		dojo.require("dojox.grid.DataGrid");
 
		var layoutCountries = [
            [{
            field: "abbr",
            name: "Abbeviation",
            width: 10
        },
        {
            field: "name",
            name: "Name",
            width: 10
        },
        {
            field: "capital",
            name: "Capital",
            width: 'auto'
        }]];
 
        var storeData = {
            identifier: 'abbr',
            label: 'name',
            items: [{
                abbr: 'ec',
                name: 'Ecuador',
                capital: '<a href=\'test\'>test</a>'
            },
            {
                abbr: 'eg',
                name: 'Egypt',
                capital: 'Cairo'
            },
            {
                abbr: 'sv',
                name: 'El Salvador',
                capital: 'San Salvador'
            },
            {
                abbr: 'gq',
                name: 'Equatorial Guinea',
                capital: 'Malabo'
            },
            {
                abbr: 'er',
                name: 'Eritrea',
                capital: 'Asmara'
            },
            {
                abbr: 'ee',
                name: 'Estonia',
                capital: 'Tallinn'
            },
            {
                abbr: 'et',
                name: 'Ethiopia',
                capital: 'Addis Ababa'
            }]
        }
 
    </script>
 
<div style="width: 400px; height: 300px;">
            <div dojoType="dojo.data.ItemFileReadStore" jsId="countryStoreForGrid" data="storeData">
            </div>
            <div id="grid" dojoType="dojox.grid.DataGrid" store="countryStoreForGrid"
            structure="layoutCountries" queryOptions="{deep:true}" query="{}" rowsPerPage="40">
            </div>
        </div> | 
Partager