Forum
04:42
10/02/2012
I have little of English. Please understand that I do have limitations in this article on how I express myself.
I saw Cautions and Limitations in treeGrid article.
"Currently it is not recommended to combine inline editing and form editing with treegrid, or the expanded column will not be editable."
I think it's been canceled.
But I download jquery.jqGrid-4.3.1 version, It is still invoke errorfunc.
Please, help me.
<script src="/ext/js/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="/ext/js/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>
<script src="/ext/js/i18n/grid.locale-kr.js" type="text/javascript"></script>
<script src="/ext/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
viewTreeGrid();
});
function viewTreeGrid() {
var lastSel;
jQuery("#treegrid").jqGrid({
treeGrid: true,
treeGridModel: 'adjacency',
treeReader : {
level_field: "LEVEL",
parent_id_field: "WBS_UP",
leaf_field: "IS_LEAF",
expanded_field: "EXPANDED"
},
ExpandColumn : 'WBS_ACTI',
ExpandColClick : true,
url: '/rsp/activity',
datatype: 'json',
jsonReader : {
root:'result',
repeatitems: false,
id: '0'
},
postData: {trId: 'getActivityList',
OBJNR:'<%=objnr%>'
},
mtype: 'POST',
colNames:['', 'ID', '프로ì 트 구조:ë‚´ì—','시작ì¼', '종료ì¼','진ë„율(%)', 'ìƒìœ„ì—무', '소ì—무여부'],
colModel:[
{name:'POINT',index:'POINT', width:150, align:'left', hidden:true},
{name:'WBS_ACTI',index:'WBS_ACTI', width:300, align:'left', key:true},
{name:'WBS_DESC',index:'WBS_DESC', width:450, align:'left', editable:true},
{name:'START_DATE',index:'START_DATE', width:150, align:'center', sortable:false, search: false, editable:true, editrules:{date:false, minValue:0}, editoptions:{dataInit: function (elem) { $(elem).datepicker({dateFormat:"yymmdd"});}, size: 11 }},
{name:'END_DATE',index:'END_DATE', width:150, align:'center', sortable:false, search: false, editable:true, editrules:{date:false, minValue:0}, editoptions:{dataInit: function (elem) { $(elem).datepicker({dateFormat:"yymmdd"});}, size: 11 }},
{name:'POC_RATE',index:'POC_RATE', width:100, align:'right', editable:true, editrules:{minValue:0, maxValue:100} },
{name:'WBS_UP',index:'WBS_UP', width:1, hidden:true},
{name:'ACTI_FLAG',index:'ACTI_FLAG', width:1, hidden:true}
],
height:'auto',
treeIcons: {plus:'ui-icon-plus',minus:'ui-icon-minus',leaf:'ui-icon-document-b'},
onSelectRow: function(id){
<%
if (userAuth != null && projAuth != null) {
if (userAuth.intern() == "a" && projAuth == "a") {
%>
var arrRootNodes = jQuery("#treegrid").jqGrid('getRootNodes');
if (id && id != lastSel) {
jQuery('#treegrid').jqGrid('restoreRow', lastSel);
lastSel = id;
}
if (arrRootNodes[0].WBS_ACTI != id) {
jQuery("#treegrid").jqGrid('editRow', id, {
keys : true,
url : '/rsp/activity',
extraparam: {trId:'updateActivitySchedule',
OBJNR:'<%=objnr%>'
},
succesfunc: function( response ) {
},
errorfunc: function(response) {
},
afterrestorefunc : function(response) {
location.href="/rsp/activity?OBJNR=<%=objnr%>";
// reload();
},
aftersavefunc: function(response) {
reload();
}
});
}
<%
}
}
%>
},
gridComplete: function(){
jQuery("#treegrid").find(".treeclick").trigger('click');
},
loadError : function(xhr,st,err) {
jQuery('#rsperror').html('Type: '+st+'; Response: '+ xhr.status + ' ' +xhr.responseText);
}
});
}
</script>
<table id="treegrid" class="urTxtH2"><tr><td/></tr></table>
<div id="ptreegrid" />
<div id="rsperror" />
Most Users Ever Online: 715
Currently Online:
64 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66