PDA

View Full Version : Validate The Grid



reddy479
31 Oct 2012, 11:25 PM
I am having The Grid Panel In my application It Having The Columns,Grid Is Placed In Form panel,
when I Want To Save The Entered Grid Details I need Validations,
I am using This Code

var form =Ext.create('lib.Commns.FormPanel', { title:'Create new List',
region:'center',
margins:'0 0 0 40',
width: '30%',
items: [
listname,
listdescription,
createnewcontactGridPanel,
back,
addrow,
deleterow,
save,

]
});
var createnewcontactGridPanel = Ext.create('lib.Commons..ZeeKoGridPanel', {
model: 'mailtrack.model.CreateList',
store:'createstore',
text : 'Lists',
width : 1100,
plugins: [cellEditing],
height : 250,
cls : 'paddingLeft',
id:'creategrid',
columns : [
{
text : 'Id',
flex:1,
sortable : true,
renderer : this.id,
dataIndex: 'id',
editor: "numberfield",
hidden: true
},
{
text : 'Select',
flex:4,
sortable : true,
editor : select,
dataIndex :'select'
}, {
text : 'Prefix',
flex:4,
sortable : true,
dataIndex : 'prefix',
editor : prefix,
},{
text : 'Email Address<span style="color:red">*</span>(eg:joe@gmail.com)',
flex:4,
sortable : true,
dataIndex : 'email',
editor : "textfield"
},
{
text : 'First Name',
flex:4,
sortable : true,
dataIndex : 'firstname',
editor : "textfield"
},
{
text : 'Last Name',
flex:4,
sortable : true,
dataIndex : 'lastname',
editor : "textfield"
},
{
text : 'Company',
flex:4,
sortable : true,
dataIndex : 'company',
editor : "textfield"
},
{
text : 'Phone Office',
flex:4,
sortable : true,
dataIndex : 'phone',
editor : "textfield"
},
{
text : 'Mobile Number',
flex:4,
sortable : true,
dataIndex : 'createdDate',
editor : "textfield"
},
{
text : 'Other1',
flex:4,
sortable : true,
dataIndex : 'other1',
editor : "textfield"
},
{
text : 'Other2',
flex:4,
sortable : true,
dataIndex : 'other2',
editor : "textfield"
},


]
});


How To Validate That Columns,
Please Send Me The Replay

mitchellsimoens
2 Nov 2012, 10:57 AM
The editor config of the columns can use validators, it's a config for the field