Retain the already present value of the cell for edit on click
Asked Answered
P

1

1

I've a grid cloumn with xtype:datecolumn as below, Now what happens is when i want to alter the value of the cell , i.e change the time on click the cell becomes blank for editing and on clicking way the previous value comes back, I want the value to be present to edit on click

this is my gridcolumn

{
   text: ' Time',
   dataIndex: 'time',
   xtype: 'datecolumn',
   format: 'Y-m-d H:i:s',
   editor: {
            xtype: 'datefield',
            format: 'Y-m-d H:i:s',
            allowBlank: false,
            maskRe: /[0-9,:,-]/
           }
  },

small screen shotenter image description here How will I be achieve this? enter image description here To edit the same old value rather than going blank and choosing the new date Thanks

Panchromatic answered 21/3, 2017 at 7:4 Comment(8)
Anyone here to help me??Panchromatic
Give some more information. 1:) Are you using buffered Store, 2:) Give the code on edit click event.Dextrose
i'm not using any onClick event, Simple gridColumn with editor, since datecolumn xtype, we donot require any store it opens a inbuilt calender, CorrectPanchromatic
No that is fine. I agree you need to store. I just ask for grid are you using buffered store or what.Dextrose
Also can you create a fiddle. Easy to understand problem.Dextrose
fiddle.sencha.com/#view/editor&fiddle/1r3p here I tried , it works actually but the same thing it doesn't work in a application, everything is same and Equal, So thought i could add some event or listeners??Panchromatic
Here also when you select other value and click out side column and again click for edit you can see the previous selected value is also heiglighted.Dextrose
Let us continue this discussion in chat.Dextrose
P
0

It was the format issue, I fixed it.. I was getting the data from the db with the format m/d/Y H:m:s and the the format in the grid was Y-m-d H:m:s changing the format in the backend fixed the issue.

Thanks @UDID for pointing me to debugging.

Panchromatic answered 21/3, 2017 at 14:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.