保留单元格的已经存在的值以在单击时进行编辑 [英] Retain the already present value of the cell for edit on click

查看:20
本文介绍了保留单元格的已经存在的值以在单击时进行编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有 xtype:datecolumn 的网格克隆,如下所示,现在发生的事情是当我想更改单元格的值时,即更改单击时间,单元格变为空白以进行编辑,并且在单击前一个值的方式返回时,我希望该值存在以在单击时进行编辑

这是我的gridcolumn

<代码>{文本:'时间',数据索引:'时间',xtype: '日期列',格式:'Y-m-d H:i:s',{xtype: '日期字段',格式:'Y-m-d H:i:s',允许空白:假,maskRe:/[0-9,:,-]/}},

我将如何实现这一目标?编辑相同的旧值而不是空白并选择新日期谢谢

解决方案

这是格式问题,我修复了它..我从数据库中获取数据,格式为 m/d/YH:m:s,网格中的格式是 Ymd H:m:s后端的格式解决了这个问题.

感谢@UDID 指点我进行调试.

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,:,-]/
           }
  },

How will I be achieve this? To edit the same old value rather than going blank and choosing the new date Thanks

解决方案

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.

这篇关于保留单元格的已经存在的值以在单击时进行编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆