Pergunta

I'm using Dojo 1.9 with GridX 1.2. I'd like to provide checkbox in grid, which could be easily clicked, changing the value of the boolean field in data mode. I'd like to use it, for example, for selection.

Currently, the checkbox shows up only after double click, then it must be clicked once again. So the 3 clicks are needed to check the state of the checkbox. It provides bad user experience, and decreases the efficiency of using the grid.

Is it possible to tell, that the checkbox would be always rendered in ready-to-click state?

Foi útil?

Solução

Yes, it can done via parameter alwaysEditing. Unfortunately, I haven't found example showing it, but you can modify the example test_edit_grid.js from test directory from gridx distribution.

The example code with use case looks so:

    { field: "Heard", name:"Check Box", width: '30px', editable: true,
        alwaysEditing: true,
        editor: "dijit.form.CheckBox",
        editorArgs: {
            props: 'value: true'
        }
    },
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top