PDA

View Full Version : problem with Ext.grid.GridPanel and checkbox alignment



nik600
21 Apr 2010, 1:29 PM
Dear all

i've got an Ext.grid.EditorGridPanel like the one at

http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html

i've added a renderer to the checkbox field like:



renderer = function( v) {
if (v == 1) {
return "YES";
} else {
return "NO";
}
My problem is that the YES / NO information in aligned at left, and this is what i want..but when i click on the cell the editor is activated (correctly) and i see the checkbox in the center of the cell.

Is there i way to avoid that?
Can i force also the checkbox to be rendered into the left of the cell ?

Thanks to all in advance

issameddine
22 Apr 2010, 1:33 AM
hello
add this code in ur css file


.x-grid3-check-col {
width:100%;
height:16px;
background-position:left left;
background-repeat:no-repeat;
background-color:transparent;
/* background-image:url(../images/default/menu/unchecked.gif);*/
}


.x-grid3-check-col-on {
width:100%;
height:16px;
background-position:left left;
background-repeat:no-repeat;
background-color:transparent;
/* background-image:url(../images/default/menu/checked.gif);*/
}