-
3 Nov 2011 10:43 PM #1
Answered: how to store a checkbox value as boolean
Answered: how to store a checkbox value as boolean
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
And in the column model of the gridCode:fields:['name',startdate,.........{name: 'active', type: 'boolean'}]
In database its saving correct value but wen I display it in grid its showing either all TRUE or FALSECode:{ text:'Active', dataIndex:'active', renderer:function(v){ return (v)?'Ture':'false'; } }
-
Best Answer Posted by skirtle
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.
-
4 Nov 2011 12:12 AM #2
hello
hello
use ext 3.4 or ext 4 ?
Vador
-
4 Nov 2011 1:17 AM #3
-
4 Nov 2011 6:23 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
- Answers
- 3102
Moved to correct forum.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
4 Nov 2011 7:41 AM #5
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.
-
6 Nov 2011 11:43 PM #6
my issue got resolved




Reply With Quote