osdevkid
osdevkid

Reputation: 147

dojo datagrid, how to do cell selection, instead of row selection?

I have searched in many places in internet, but so far I cant able to find a right way to do "cell" selection on dojo datagrid.

If anybody know how to do cell selection instead of row selection than it will be helpful for me.

It is a one of the basic requirement in dojo datagrid, but so far, I can't able to find out.

Please help me.

Upvotes: 0

Views: 2195

Answers (1)

Oliver
Oliver

Reputation: 43

although DataGrid does not support this, you can try dojox.grid.EnhancedGrid. There's a Selector plugin available in dojo1.6, which supports cell selection.

Here's how to use it:

dojo.require('dojox.grid.EnhancedGrid');
dojo.require('dojox.grid.enhanced.plugins.Selector');

//......prepare the store, structure, etc.

dojo.ready(function(){
    var grid = new dojox.grid.EnhancedGrid({
        store: myStore,
        structure: myLayout,
        rowSelector: "20px",//This is used to select row.
        plugins: {
            selector: {
                //row: false    //If you'd like to disable row selection, just add this.
            }
        }
    });
    grid.placeAt('aDomNode');
    grid.startup();
});

There's a dojo campus document covering this plugin.

Upvotes: 1

Related Questions