tags:

views:

7

answers:

0

hi

I have a js function that allows me to format a column grid after a select from another column in the same grid (column type dojox.grix.cells.select "):

function Columnformatter()

{

grid.getCell(4).formatEditing = function(inDatum, inRowIndex) { if (widget == "select") {

        codeHTML = "<select class=\"dojoxGridSelect\">";
        for (var i = 0; i < tab.length; i++) {
            codeHTML += "<option value=\""+tab[i]["id"]+"\">"
            +tab[i]["valeur"]+"</option>";
        }
        codeHTML += "</select>";
        return codeHTML;

    }

} }

This function works very well: they change the type of the second column grid based on the value selected in the first column grid. eg if I select 'select' the 1st column, the type of the second column grid becomes drop-down list.

but I have a small problem: I want to display in the grid and the values stored in the database id.