CheckboxSelectionModel behaviour
Author:
webmaster
01 6th, 2009 in
xn--9ou.com
edit
I want the CheckboxSelectionModel to behave as follows:
1. You can only select rows by clicking on the checkbox. Clicking cells wont select the row.
2. You can still drag/reorder rows inside grid (like in this thread (http://extjs.com/forum/showthread.php?t=21913), fix posted by clarkke8), without the row beeing selected.
I thought I solved the first part (1), but when I added the drag-row functionality I got back to square one. enableDragDrop seems to mess up the checkboxselectionmodel.
// Rickard
UPDATE:
Change /ext/examples/grid/grid3.js, add "enableDragDrop: true" to grid2:
////////////////////////////////////////////////////////////////////////////////////////
// Grid 2
////////////////////////////////////////////////////////////////////////////////////////
var sm = new xg.CheckboxSelectionModel();
var grid2 = new xg.GridPanel({
enableDragDrop: true,
store: new Ext.data.Store({
reader: reader,
data: xg.dummyData
}),
cm: new xg.ColumnModel([
sm,
{id:'company',header: "Company", width: 200, sortable: true, dataIndex: 'company'},
{header: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
{header: "Change", width: 120, sortable: true, dataIndex: 'change'},
{header: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
{header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
]),
sm: sm,
width:600,
height:300,
frame:true,
title:'Framed with Checkbox Selection and Horizontal Scrolling',
iconCls:'icon-grid',
renderTo: document.body
});
#If you have any other info about this subject , Please add it free.# |