Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






JQGRID 4.4.0 Master/Detail freezes after add , edit , Cancel – Urgent Pl. Help

UserPost

10:15
15/07/2012


editplus

India

Member

posts 3

Problem: master grid has onSelectRow event and it displays detail grid correctly. Detail grid has onclickSubmit event to update key field from master grid row. When I click add on bottom navigation of detail grid and save detail data it saved data but freezes the detail grid. Even just press the add button and cancel it without save it freezes the grid.

After that if you select any row in Master .. detail grid shows 'Loading' and it did not shows any detail rows until you refresh the page and not clicked the add / edit button.

I checked the Responed message of AZAX and its returning all data even in DOM it creates columns but without data.

Please help.

Here is the code


</td></tr></tbody></table><div id="subjecttopicpage"></div><table id="subjecttopic"></table><td align="right"></td><div id="subjectFormpage"></div><table id="subjectForm"></table><table><tbody><tr><td>

  <script src="jquery.js" type="text/javascript"></script>
  <script src="jquery-ui-1.8.21.custom.min.js" type="text/javascript"></script>
  <script src="jqgrid/i18n/grid.locale-en.js" type="text/javascript"></script>
  <script src="jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>
<script type="text/javascript">

var jq=jQuery.noConflict();

var subjectFormgrid =

jq("#subjectForm").jqGrid({

url:eduajaxurl+'&task=getdetail&config=subject',

datatype: "json",

colNames:['id','Subject','Enable',''],

colModel:[

{name:'id',index:'id', hidden: true , editable: true, editrules: {edithidden:true}},

{name:'subject',index:'subject asc', width:200, editable:true},

{name:'published',sortable:false, width:60, editable:true,align:'center',formatter:'checkbox',edittype:"checkbox"},

{name: 'myac', width:45, fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:true}}

],

rowNum:10,

rowList:[10,20,30],

pager: '#subjectFormpage',

sortname: 'subject',

sortorder: "asc",

viewrecords: true,

caption:"Subject Details",

editurl:eduajaxurl+'&task=saveconfig&config=subject',

autowidth:true,

multiselect: false,

onSelectRow: function(ids) {

if(ids == null) {

ids=0;

if(subjecttopicFormgrid.jqGrid('getGridParam','records') >0 )

{

subjecttopicFormgrid.jqGrid('setGridParam',{url:eduajaxurl+"&task=getdetail&config=subjecttopic&subid="+ids,page:1});

subjecttopicFormgrid.jqGrid('setCaption',"Topic Detail: "+ids);

subjecttopicFormgrid.trigger('reloadGrid');

}

} else {

subjecttopicFormgrid.jqGrid('setGridParam',{url:eduajaxurl+"&task=getdetail&config=subjecttopic&subid="+ids,page:1});

subjecttopicFormgrid.jqGrid('setCaption',"Subject Topics: "+ids);

subjecttopicFormgrid.trigger('reloadGrid');

}

}

});

jq("#subjectForm").jqGrid('navGrid','#subjectFormpage',{edit:false,add:true,del:false});

var subjecttopicFormgrid =

jq("#subjecttopic").jqGrid({

url:eduajaxurl+"&task=getdetail&config=subjecttopic&subid=2″,

datatype: "json",

colNames:['id','subid','Topic','Enable',''],

colModel:[

{name:'id',index:'id', hidden: true , editable: true, editrules: {edithidden:false}},

{name:'subid',index:'subid', hidden: true , editable: true, editrules: {edithidden:false}},

{name:'subjecttopic',index:'subjecttopic asc', width:200, editable:true},

{name:'published',sortable:false, width:60, editable:true,align:'center',formatter:'checkbox',edittype:"checkbox"},

{name: 'myac', width:45, fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:true}}

],

rowNum:10,

rowList:[10,20,30],

pager: '#subjecttopicpage',

sortname: 'subjecttopic',

sortorder: "asc",

viewrecords: true,

caption:"Subject Topics",

editurl:eduajaxurl+'&task=saveconfig&config=subjecttopic',

autowidth:true,

multiselect: false

});

subjecttopicFormgrid.jqGrid('navGrid','#subjecttopicpage',{add:true,edit:false,del:false},

{},

{onclickSubmit: function(rp_ge, postdata) {

var parentid = subjectFormgrid.getGridParam('selrow');

postdata.subid = parentid;

}}

);

}

</script>

09:49
29/07/2012


editplus

India

Member

posts 3

Hellooo … 


Anybody to help me in this please ?

Please share if you are also facing same problemor share your workaround.


Thanks in advance.


Regards

John

11:44
30/07/2012


tony

Sofia, Bulgaria

Moderator

posts 7010

Hello,

If you have the desire to read little bit a documentation, before to wait someone to answer maybe you will find the answer.

Please read hare what parameters are accepted and WHAT SHOULD RETURN THE onclcikSubmit event:

http://www.trirand.com/jqgridw…..licksubmit


Regards

14:57
01/08/2012


editplus

India

Member

posts 3

Thanks Tony to look at this.

Isssue is still remain same. look at the demo at trirand.com side

Master Detail Demo with Issue   : http://www.trirand.com/blog/ph…..efault.php


Steps:

1. Click any row in master grid 

          It populate the child rows in detail grid.

2. Click on "FIND" button (megnifying glass) of DETAIL GRID and just click the "Find" button on Search popup.

3. Now Click any row in master Grid….

         detail grid shows "Loading" and then blank.

This what happens for any navigation button (Add/Edit/Cancel/Delete) for master-detail grid


Regards

John


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

29 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9596

Posts: 28792

Membership:

There are 10194 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7010 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information