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_TopicIcon
URL is not Fireing in the afterclickPgButtons function
16/12/2013
16:33
Avatar
sdyke1
Member
Members
Forum Posts: 14
Member Since:
10/12/2013
sp_UserOfflineSmall Offline

The following URL works in the onSelectRow function but not the afterclickPgButtons. The alert in the function is fireing.

<table id="list2"></table>

<div id="pager2"></div>

<script type="text/javascript">

$(document).ready(function(){

var selID = "";

var temp = "";

$("#list2").jqGrid({

url:'/QMSWebApp/DCRQueueServlet',

editurl:'/QMSWebApp/DCRIndexEditServlet',

datatype: "json",

height: "auto",

colNames:['Index#','Priority','Drawing#/Rev','Dwg Index#','Source','Requester','Request Date','Requested Change','Assigned To','Reject Request','Reason for Rejection','MngrAccess','EngAccess'],

colModel:[

{name:'id', index:'id', width:55, editable: true, editoptions:{ readonly:'readonly'}, editrules:{edithidden:true}, formoptions:{rowpos:1, colpos:1,label:"Index#:"},

cellattr: function(rowId, val, rawObject, cm, rdata){

if(rawObject.priority==1 && (rawObject.mngraccess || rawObject.engaccess)){return 'class="redBG editthis"';}

else if(rawObject.priority==1 && !rawObject.mngraccess && !rawObject.engaccess){return 'class="redBG printthis"';}

else if(rawObject.priority==2 && (rawObject.mngraccess || rawObject.engaccess)){return 'class="blueBG editthis"';}

else if(rawObject.priority==2 && !rawObject.mngraccess && !rawObject.engaccess){return 'class="blueBG printthis"';}

else if(rawObject.priority==3 && (rawObject.mngraccess || rawObject.engaccess)){return 'class="greenBG editthis"';}

else if(rawObject.priority==3 && !rawObject.mngraccess && !rawObject.engaccess){return 'class="greenBG printthis"';}

else if(rawObject.priority==4 && (rawObject.mngraccess || rawObject.engaccess)){return 'class="greenBG editthis"';}

else if(rawObject.priority==4 && !rawObject.mngraccess && !rawObject.engaccess){return 'class="greenBG printthis"';}

else{return 'class="printthis"';}}},

{name:'priority', index:'priority', width:55, hidden: true, editable: true, editrules:{edithidden:true}, formoptions:{rowpos:2, colpos:1,label:"Priority:"}, edittype: "select", editoptions: { size: 1}},

{name:'drawingno', index:'drawingno', width:125, editable: true, editoptions:{ readonly:'readonly'}, formoptions:{rowpos:3, colpos:1,label:"Drawing#:"}},

{name:'drawingid', index:'drawingid', width:90, hidden: true, editable: true, editrules:{edithidden:true}, formoptions:{rowpos:3, colpos:2,label:"See Dwg Index# :",elmsuffix: " for fix."}, edittype: "select", editoptions: { size: 1}},

{name:'source',index:'source', width:90, editable: true, editoptions:{ readonly:'readonly'}, formoptions:{rowpos:4, colpos:1,label:"Source:"}},

{name:'requester',index:'requester', width:120, editable: true, editoptions:{ readonly:'readonly'}, formoptions:{rowpos:5, colpos:1,label:"Requester:"}},

{name:'request_date',index:'request_date', width:90, editable: true, editoptions:{ readonly:'readonly'}, formoptions:{rowpos:6, colpos:1,label:"Date Requested:"}},

{name:'requestedchange',index:'requestedchange', width:200, hidden: true, editable: true, formoptions:{rowpos:7, colpos:1,label:"Requested Change:"}, editrules:{edithidden:true}, edittype: "textarea", editoptions:{ readonly:'readonly', rows: '3', cols: '50'}},

{name:'responsibility',index:'responsibility', width:120, editable: true, formoptions:{rowpos:8, colpos:1,label:"Assigned To:"}},

{name:'rejectrequest',index:'rejectrequest', width:10, hidden: true, editable: true, editrules:{edithidden:true}, formoptions:{rowpos:9, colpos:1,label:"Reject Request:"}, edittype: "checkbox", editoptions:{ value: "1:0"}},

{name:'reasonforrejection',index:'reasonforrejection', width:10, hidden: true, editable: true, editrules:{edithidden:true}, formoptions:{rowpos:10, colpos:1,label:"Reason for Rejection:"}, edittype: "textarea", editoptions:{ rows: '3', cols: '50'}},

{name:'mngraccess',index:'mngraccess', width:90, hidden: true},

{name:'engaccess',index:'engaccess', width:90, hidden: true},

],

onSelectRow: oSelect,

rowNum:20,

rowList:[10,20,30],

loadonce: true,

pager: '#pager2',

viewrecords: true,

gridview: true,

loadComplete: lComplete,

caption:"Drawing Change Request Records"

});

$("#list2").jqGrid('delGridRow', selID);

$("#list2").jqGrid('navGrid','#pager2',{edit:true,add:false,del:true},{url:'/QMSWebApp/DCRIndexEditServlet', recreateForm: true, width: 700, afterclickPgButtons: afterpageClick},{url:'/QMSWebApp/DCRIndexAddServlet'},{});

function lComplete(){

};

function oSelect(id){

selID = id;

temp = $("#list2").getRowData(id)['drawingno'];

$("#list2").setColProp('drawingid', { editoptions: { dataUrl: '/QMSWebApp/DCRDrawingIndexListServlet?selecteditem=' + temp}});

$("#list2").setColProp('priority', { editoptions: { dataUrl: '/QMSWebApp/DCRPriorityOptionsListServlet'}});

$("#list2").setColProp('responsibility', { editoptions: {dataEvents: [{ type: 'click', fn: function(e) {findusername(this.name,'ALL'); } },]}});

};

function afterpageClick(whichbutton, formid, rowid){

temp = $("#list2").getRowData(rowid)['drawingno'];

alert(temp);

$("#list2").setColProp('drawingid', { editoptions: { dataUrl: '/QMSWebApp/DCRDrawingIndexListServlet?selecteditem=' + temp}});

};

$('.exporttoexcel').on("click", function(){

alert("Export to Excel");

});

});

</script>

17/12/2013
13:22
Avatar
sdyke1
Member
Members
Forum Posts: 14
Member Since:
10/12/2013
sp_UserOfflineSmall Offline

To explain this a liitle better. I have a drop down whose content is dependant on the value of another cell. This works great when the onRowSelect is fired the dropdown has dataURL that gets repopulated.

But once the edit form is open and the next, prev is clicked the drop down does not repopulate even though I have an afterclickPgButtons function that is supposed to call the dataURL each time.

I really need some help here. Thanks.

Do I need to explain better?

18/12/2013
14:55
Avatar
sdyke1
Member
Members
Forum Posts: 14
Member Since:
10/12/2013
sp_UserOfflineSmall Offline

Do I need a better explanation of what I am tring to accomplish? I could really use some direction here. Thanks.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
33 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