PDA

View Full Version : Grid Editor + checkbox



luisoswaldo
23 Aug 2011, 9:00 AM
Hi, you can still show the image of a checkbox modified (or unmodified), then exit the editor. It's something like that is always visible cellSelectionModel the checkbox. I wonder if this is possible in a normal column. If it is not possible would like to know if I could place an image within trueText (check selected) and one for falseText (check not selected).

I appreciate any help you can offer

luisoswaldo
26 Aug 2011, 10:13 AM
{
xtype: 'booleancolumn',
dataIndex: 'M',
header: 'M',
tooltip: 'Met Inc.',
sortable: true,
width: 40,
trueText: '<img src="lib/extjs/resources/images/default/otros/check_marcado.png" width="13" height="13" alt="x" />',
falseText: '<img src="lib/extjs/resources/images/default/otros/check_desmarcado.png" width="13" height="13" alt="-" />',
editor: {
xtype: 'checkbox'
}
}

Alone would fail to place the images in a css class to improve the speed of page loading. I propose to add this to the library because it produces a nice visualeffect to the user. And I need to improve the quality check is unmarked and very bad.

27718

luisoswaldo
27 Aug 2011, 3:35 PM
Added two classes to css-all.css ext. The problem is that I can not display theimages. If I do appear separately. firefug verify the class and apparently all is wellbecause the image path is good.



.check-marcado {
background-image:
url(../images/default/otros/check_marcado.png);
width:13;
height:13;
background-repeat:no-repeat
}
.check-desmarcado{
background-image:
url(../images/default/otros/check_desmarcado.png);
width:13;
height:13;
background-repeat:no-repeat
}


I replaced the code in the grid by



trueText: '<p class="check-marcado" alt="x" />',
trueFalse: '<p class="check-desmarcado" alt="-" />'


I leave the pictures if you serve someone.

27726 27727

Any ideas because I do not work css class?