Kannan K
3 Sep 2012, 12:17 AM
Hi,
I have the requirement says, the 'Row Editable grid' column should have 'Textfield and Image' together in the same cell. But when I submit the edited row, I am getting java script error in ext-all.js method of 'validateEdit' functionality.
I have attached the code below for the reference.
columns: [{
text: 'Start/End Time',
width: 185,
flex: 1,
sortable: true,
dataIndex: 'startEndTime',
editor: {
xtype:'panel',
//style:"margin-top:30px;",
items:[{
border:false,
style:'margin-top:10px;',
items: [
{
xtype: 'textfield',
id:'scStart',
fieldLabel: 'Start:',
style:'width:10px;float:left;padding-left:10px;',
labelStyle:'padding-left:16px;font-weight:normal;',
name: 'startTime',
labelAlign:'left',
labelWidth: 45,
width: 144,
height:20,
labelSeparator:''
},{
xtype : 'image',
src: 'images/gridContent/btn_datetime.png',
height:20,
//width : 34,
style:"cursor: hand",
}
}
}
Question No 1: Whether we can add the 'panel [which is having Text field and image]' inside the column editor?
Question No 2: If yes, whether we can override the validateEdit functonality which is in ext-all.js to avoid the script error?
I have the requirement says, the 'Row Editable grid' column should have 'Textfield and Image' together in the same cell. But when I submit the edited row, I am getting java script error in ext-all.js method of 'validateEdit' functionality.
I have attached the code below for the reference.
columns: [{
text: 'Start/End Time',
width: 185,
flex: 1,
sortable: true,
dataIndex: 'startEndTime',
editor: {
xtype:'panel',
//style:"margin-top:30px;",
items:[{
border:false,
style:'margin-top:10px;',
items: [
{
xtype: 'textfield',
id:'scStart',
fieldLabel: 'Start:',
style:'width:10px;float:left;padding-left:10px;',
labelStyle:'padding-left:16px;font-weight:normal;',
name: 'startTime',
labelAlign:'left',
labelWidth: 45,
width: 144,
height:20,
labelSeparator:''
},{
xtype : 'image',
src: 'images/gridContent/btn_datetime.png',
height:20,
//width : 34,
style:"cursor: hand",
}
}
}
Question No 1: Whether we can add the 'panel [which is having Text field and image]' inside the column editor?
Question No 2: If yes, whether we can override the validateEdit functonality which is in ext-all.js to avoid the script error?