保留单元格的已经存在的值以进行点击编辑 [英] Retain the already present value of the cell for edit on click
问题描述
我有一个具有xtype:datecolumn的网格列,如下所示,
现在,当我想要改变单元格的值时,会发生什么,也就是改变点击单元格的空格以进行编辑和点击方式以前的值回来,我希望值可以在点击上编辑
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
这是我的网格列
{
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,:,-]/
}
},
我将如何实现?
要编辑相同的旧值而不是空白并选择新的日期
谢谢
How will I be achieve this? To edit the same old value rather than going blank and choosing the new date Thanks
推荐答案
这是格式问题,我修复了..
我正在从数据库获取数据格式为code> m / d / YH:m:s 并且网格中的格式为 Ymd H:m:s
更改格式在后端解决问题。
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.
感谢@UDID指向我调试。
Thanks @UDID for pointing me to debugging.
这篇关于保留单元格的已经存在的值以进行点击编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!