PDA

View Full Version : how to store a checkbox value as boolean



poojagarg89
3 Nov 2011, 10:43 PM
I have a checkbox from which m storing its value to database as boolean value i.e. true or false

but when I'm keeping checkbox type as boolean and rendering it in grid to show its value it gives either all true or false

code is


fields:['name',startdate,.........{name: 'active', type: 'boolean'}]
And in the column model of the grid



{ text:'Active', dataIndex:'active', renderer:function(v){ return (v)?'Ture':'false'; } }


In database its saving correct value but wen I display it in grid its showing either all TRUE or FALSE

ajaxvador
4 Nov 2011, 12:12 AM
use ext 3.4 or ext 4 ?

poojagarg89
4 Nov 2011, 1:17 AM
ExtJs 4.0

mitchellsimoens
4 Nov 2011, 6:23 AM
Moved to correct forum.

skirtle
4 Nov 2011, 7:41 AM
Could you post an example of the data (JSON?) that comes from your server?

Try getting rid of the type: 'boolean' and the renderer and let us know what happens.

poojagarg89
6 Nov 2011, 11:43 PM
my issue got resolved :)