Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Can I use a inline edit in tree mode?
10/02/2012
04:42
Avatar
redeteus
Seoul, Korea
New Member
Members
Forum Posts: 1
Member Since:
10/02/2012
sp_UserOfflineSmall Offline

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. CryCry

<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" />

08/08/2012
13:45
Avatar
kamran377
Pakistan
Member
Members
Forum Posts: 4
Member Since:
08/08/2012
sp_UserOfflineSmall Offline

I'm using inline edit for tree grid in jqGrid  4.3.2

Kamran Ali

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information