View Full Version : Ext.ux.ListView.plugin.CheckColumn and Ext.ux.list.CheckColumn

27 Aug 2010, 5:56 AM
First I have Ext.ux.ListView.plugin.CheckColumn. This works similar to the example ux Grid CheckColumn plugin except it's for a ListView. It changes the store value and fires beforecheck and check events. It can be configured to keep row selections and use other click events like dblclick rather than the default click event. Code was inspired by Saki's RowAction code and the Ext example ux.

Extract into the examples/list folder for a demo. (Must be behind a webserver to load the plants.xml file)

2 Sep 2010: v0.2 added more docs

Use Ext.ux.ListView.plugin.CheckColumn if you need to be able to be able to check and uncheck the checkbox.

If all you want to do is display a checkbox instead of a True/False string for a boolean column then use Ext.ux.list.CheckColumn. It behaves exactly like Ext.list.BooleanColumn (http://dev.sencha.com/deploy/dev/docs/output/Ext.list.BooleanColumn.html)

* @class Ext.ux.list.CheckColumn
* @extends Ext.list.Column

Ext.ux.list.CheckColumn = Ext.extend(Ext.list.Column, {
constructor : function(c) {
c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}');

c.tpl.format = function(v) {
return String.format('<div class="x-grid3-check-col{0}"> </div>', v ? '-on' : '');

Ext.ux.list.CheckColumn.superclass.constructor.call(this, c);

Ext.reg('lvcheckcolumn', Ext.ux.list.CheckColumn);

2 Sep 2010, 8:10 AM