그리드 item 에 업데이트후 그리드 표시열에 바로 표시할 수 있는방법이 있는지??
` { key: "pcs_cnt", sort:false, label: "수량", width: "90", align: "center", formatter: function() { var po = []; po.push("<div style="text-align:center;">"); po.push("<input type="text" class="AXInput W80" style="text-align:right" id="pcs_cnt_" + this.index + "" name="pcs_cnt" onclick="this.select();" value="" + this.item.pcs_cnt.money() + "" onchange="fnObj.grid.update(" + this.index + ",this,'Y');"" + " />"); po.push(""); return po.join(''); } } , update: function (idx, input, numberYN) { // JSON values update from input Element value var item = fnObj.arInvGrid.get().list[idx];
if (numberYN == "Y") {
item[input.name] = input.value.number();
$("#" + input.id).val(input.value.money());
}
else
item[input.name] = input.value;
},
위와 같이 Item 객체에 업데이트를 해서 주고 있습니다.
fnObj.grid.get().list[idx][key] = value;
다른 item 객체에 계산된것을 업데이트 후에 바로 그리드에 표시가 안되던데.. ` 이런식으로 같을 주고 나서 updatelist나 데이터 싱크로 업데이트 하면 입력박스에 포커스 줬던것이 날아가 버리는데..
해당 그리드 열에 해당 item에 표시되는 객체에 바로 적용할 수 있는지..
http://jdoc.axisj.com/AXGrid.html#.updateItem 요게 필요하신듯 합니다.
inlineedit 기능도 고려해 보세요..
http://dev.axisj.com/samples/AXGrid/inline-edit.html
updateitem 안쓰고 그리드열에 ID값을 알아서 item업데이트후 그리드표시열에 바로 적용할수 있게 하구 싶습니다.