View Full Version : how to set a field to accept nulls

23 Dec 2011, 8:54 AM
how can i tell to the model that a field can accept nulls ?
so when im editing with a grid wont force me to fill that column

Ext.define (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext-method-define)('User', {
extend: 'Ext.data.Model (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.data.Model)',
fields: [ 'name', 'email',
{name: 'note', type: 'string'},
{name: 'age', type: 'int'},
{name: 'gender', type: 'string', }

something like {name: 'note', type: 'string', acceptNull:true}??
couldnt find info in the documentation

(sorry for my bad english)

23 Dec 2011, 9:30 AM
Hi dedoz

You should have a look at this http://docs.sencha.com/ext-js/4-0/#!/guide/grid The section covering editing should help you out.