-
24 Jun 2010 6:44 AM #1
Change the state of a checkboxColumn
Change the state of a checkboxColumn
Hi,
I have a grid in which my first column is a CheckColumn.
In one case, I want that all my checkboxes are slectable, and in an other case, (when I click on a button) I want that all my checkboxes are disabled.
How can I do this ?
I have not found a solution to do that.
Thanks.
-
24 Jun 2010 8:34 AM #2
If you are using Ext.grid.CheckColumn component
PHP Code:var checkColumn = new Ext.grid.CheckColumn({
...
//listen your mouse down event
onMouseDown : function(e, t){
if(condition1) {
//return false to stop the checking
return false;
}
}
});
-
24 Jun 2010 8:38 AM #3
Try this, this will fix all the scenarios. Play with it according to your needs.
PHP Code:onMouseDown : function(e, t){
if(condition1) {
return false;
}
//else follow the normal routine
if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){
e.stopEvent();
var index = this.grid.getView().findRowIndex(t);
var record = this.grid.store.getAt(index);
record.set(this.dataIndex, !record.data[this.dataIndex]);
}
}
-
24 Jun 2010 10:17 AM #4
Thank you.
But this is PHP code. Is it the same way in Java ?
-
24 Jun 2010 10:19 AM #5
Oh you are asking for GWT, try a similar thing in GWT. The code sample is for ExtJS/Sancha

-
24 Jun 2010 10:21 AM #6
Yes, I'm asking for GXT

I will try to adapt it.
Similar Threads
-
[2.0??] Problem with CheckboxColumn
By aymen00007 in forum Ext 2.x: BugsReplies: 2Last Post: 11 Aug 2010, 4:01 AM -
Ext.ux.grid.CheckboxColumn
By tcl_java in forum Ext 3.x: User Extensions and PluginsReplies: 7Last Post: 16 May 2010, 12:54 PM -
grid checkboxColumn
By yanqing.zhou in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 14 May 2009, 10:07 PM -
RowExpander + CheckboxColumn in IE6 not functioning
By mcanthon in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 6 Jun 2008, 2:32 PM -
Change readOnly state
By acontreras in forum Community DiscussionReplies: 0Last Post: 21 Jan 2008, 4:58 AM


Reply With Quote