in easyui-datagrid i have
<th field="Age" width="05%" align="center" formatter="fmtAge" >Age</th>
function fmtAge(val,row){
return getDeltaAge(row.inserted);
}
function getDeltaAge(dateUTC) {
var matches = dateUTC.match(/^\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})\s*$/);
var DateUTC = new Date(parseInt(matches[1],10),parseInt(matches[2],10) - 1,parseInt(matches[3],10),parseInt(matches[4],10),parseInt(matches[5],10),parseInt(matches[6],10));
var now = new Date()
, nowUTCtimestamp = now.getTime() + now.getTimezoneOffset()*60*1000
, nowUTC = new Date(nowUTCtimestamp)
, difference = nowUTC.getTime() - DateUTC.getTime()
, ageDifference = Math.floor(difference/1000/60/60/24)
;
if ( difference < 0 ){
ageDifference = "";
ageName = "new";
}else if( ageDifference > 0){
ageName = " d";
}else{
difference -= ageDifference*1000*60*60*24;
var ageDifference = Math.floor(difference/1000/60/60);
if( ageDifference > 0 ){
ageName = " h";
}else{
difference -= ageDifference*1000*60*60;
var ageDifference = Math.floor(difference/1000/60);
if( ageDifference > 0 ){
ageName = " m";
}else{
ageDifference = "";
ageName = "new";
}
}
}
if(ageDifference != "" && ageDifference != 0 && ageDifference<10){ageDifference = "0" + ageDifference };
return ageDifference+ageName;
};
How refresh visibility(?) ONLY THIS CELL ?
without reload all|part of data or to refresh full row or refresh datagrid-view