1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    8
    Vote Rating
    0
    Kannan K is on a distinguished road

      0  

    Default Unanswered: Column Editor which is having panel doent get values

    Unanswered: Column Editor which is having panel doent get values


    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?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,010
    Answers
    668
    Vote Rating
    460
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    What is the purpose of having an image in a editor cell?

    Scott.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    8
    Vote Rating
    0
    Kannan K is on a distinguished road

      0  

    Default


    The purpose of the image here is to open the Date/Time window once clicked, and the selected date/time will be populated in to its nearest 'text field'.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,010
    Answers
    668
    Vote Rating
    460
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You can simply change the xtype of your field editor to 'datefield'
    http://docs.sencha.com/ext-js/4-1/#!...orm.field.Date

    Scott.

Thread Participants: 1