I’m using a tabulator to create a grid,
When the cell is completely modified, I would like to modify the cell’s addsts with “update.
So when I finished modifying a cell using the ‘cellEdited’ function, I got the information of that cell and entered update in addsts,
Using console.log changes the value to addsts to update, but does not change the value to addsts on the grid on the screen.
To solve this problem, I checked the official documents and they told me the table.redraw() method, but if the data is more than 10000, I think it’s an inefficient way to redraw the whole thing every time I modify multiple rows.
I want to update only the row of the cell I modified, is there a way?
The columns I defined.
var table = new Tabulator("#dataList", {
height:300,
virtualDom: true, // 스크롤 추가
virtualDomBuffer: 50,
virtualDomBufferedRenderTimeout: 20,
layout: "fitColumns",
ajaxURL: "<c:url value='findList'/>",
ajaxConfig: "POST",
ajaxContentType:"json",
ajaxParams: function(params) {
return {
searchValue1: $("[name=searchValue1]").val(),
searchValue2: $("[name=searchValue2]").val()
};
},
columns:[
{formatter:"addsts", hozAlign:"center", width:150},
{formatter:"rownum", hozAlign:"center" , width:50},
{formatter:"rowSelection",titleFormatter:"rowSelection",align:"center",headerSort:false, hozAlign:"center" , width:50},
{title:"1", field:"codecategorykey", editor:"input", editable:editCheck, "cellClick":cellClick},
{title:"2", field:"categoryname", editor:"input", cellEdited:function(cell){
var rowData = cell.getRow().getData();
if (rowData.addsts != "insert"){
var rowData = cell.getRow().getData();
rowData.addsts = "update";
}
}}
],
movableColumns:true,
resizableRows:true,
initialSort:[
{column:"codecategorykey", dir:"desc"}
],
rowSelection:true,
ajaxResponse: function(ajaxUrl, params, response){
return response;
}
});
Thank you.
If you change the value of addsts to update, it is expected that both the data value taken on the console and the grid on the screen will be changed to update.
However, the data on the console has been changed to update, but the values do not change dynamically on the grid on the screen.
I don’t want to refresh the entire grid, I want to change the value of the row I updated, leaving the other data intact.
table.updateData didn’t work