axisj
axisj copied to clipboard
Grid misc 텍스트박스 수정 후 스크롤 이동 시 수정값이 사라지는 오류
http://dev.axisj.com/samples/AXGrid/misc.html 여기에서 제목을 수정하고 스크롤을 내렸다 다시 올리면 수정한 값이 사라지는 오류가 있습니다. 오류를 해결할 방법이 있는지 알고싶습니다.
페이지 상에 소스를 보시면
onchange:function(){
trace(this.objID);
var myi = this.objID.substr(this.objID.lastIndexOf("_").number()+1);
myGrid.list[myi].regDate = this.value;
}
이처럼 변경된 값은 리스트에 반영을 해 줘야 합니다.
return '<input type="text" name="" id="title_'+this.index+'" class="AXInput" value="'+ this.value +'" style="width:100%;box-sizing:border-box;height:23px;" />';
이런 형태를
return '<input type="text" name="" id="title_'+this.index+'" class="AXInput" onchange="blah("'+this.index+'")" value="'+ this.value +'" style="width:100%;box-sizing:border-box;height:23px;" />';
이런 식으로 변경 하셔서 인덱스값을 받아 리스트 값을 업데이트 해주시면 되겠네요.