简体   繁体   English

GWT CELLTABLE:特定行中的所有列值是否都可能恢复为旧值?

[英]GWT CELLTABLE : Is it possible that all column values from particular row restore to old value?

Is it possible that all column values from particular row restore to old value ? 是否可以将特定行中的所有列值都还原为旧值?

|| ID || Dept || Code || RNO || RCode|| .....................................................||ZCode ||
|| 1  ||  CS   || 001  ||  3      ||  030||...................................................||Q1||
|| 2  ||  DS   || 001  ||  5      ||  040||.....................................................||S1 ||

Suppose In above editable grid I changed 1st record ie 假设在上面的可编辑网格中,我更改了第一条记录,即

|| 1  ||  CS   || 001  ||  3      ||  030||.....................................................||Q1||

changed to 变成

|| 1  ||  BP   || 010  ||  3      ||  003||.....................................................||Q1||

Is there any way to restore old object(row) values instead to clearing cell view data for each column and redraw editable grid. 有什么方法可以恢复旧的对象(行)值,而不是清除每列的单元格视图数据并重新绘制可编辑网格。

In Short revert record to old value which is selected by our checkbox (All or selected chkbox only ie selectionModel.isSelected(object) ) 在短记录中,将记录还原为由我们的复选框选中的旧值(全部或仅选定的chkbox,即selectionModel.isSelected(object)

My Grid contain (2-N) column so I am asking this question ? 我的网格包含(2-N)列,所以我问这个问题?

Are you using a data provider to provide data to the CellTable? 您是否正在使用数据提供程序来向CellTable提供数据? You could clone the row data before rendering the table (or on edit) and when you needed to revert you could copy items back in to the data provider and call table.redraw(); 您可以在呈现表之前(或在编辑时)克隆行数据,并且在需要还原时可以将项目复制回数据提供者并调用table.redraw();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM