I am using jqGrid to display record. To display record i have use url parameter to get relevant data using query string parameter(callID), but I have observed that first time it works fine after that when i tried to view another record (different callID) it reset the callID parameter to it the first one.
Can anybody help me out?
This is my javascript function.
|
1 2 |
<div class="sfcode">function GetAttachment(callID) { //here i am getting right value<br /> //$('#ActivityGrid').jqGrid('clearGridData');</div> |
// $(“#ActivityGrid”).jqGrid('setGridParam', { datatype:'json'}).trigger(“reloadGrid”);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
<div class="sfcode">var ActivityGrid;<br /> //var myDataSuccess;<br /> ActivityGrid = $("#ActivityGrid").jqGrid({<br /> ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },<br /> <br /><br /> loadError: function (xhr, st, err) {<br /> debugger;<br /> $("#ActivityGridMap").html("Type: " + st + "; Response: " + xhr.status + " " + xhr.statusText);<br /> },<br /> <br /> datatype: 'json',<br /> url: 'wts.asmx/GetAttachment?callID=' + callID, //passing correct value,but in webservice it gives me first value.<br /> mtype: 'POST',<br /> forceFit: true,<br /> loadComplete: function (data) {<br /> // debugger;<br /> $(this).HideBusy();<br /> },<br /> serializeGridData: function (postData) {<br /> if (postData.searchField === undefined) postData.searchField = null;<br /> if (postData.searchString === undefined) postData.searchString = null;<br /> if (postData.searchOper === undefined) postData.searchOper = null;<br /> if (postData.filters === undefined) postData.filters = null;<br /> return JSON.stringify(postData);<br /> },<br /> jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", total: "d.total", records: "d.records" },<br /> colNames: ['Activity', 'Date', 'Time', 'Handled By', 'Notes', 'Details', 'Attachment', 'Display'],<br /> colModel: [<br /> { name: 'ClgCode', index: 'ClgCode', align: "left", width: 80 },<br /> { name: 'Date', index: 'Date', align: "left", width: 70, formatter: 'date', formatoptions: { srcformat: 'yyyyMMdd', newformat: 'd-M-y' }, width: 100 },<br /> { name: 'Time', index: 'Time', align: "left", width: 50, formatter: 'time', width: 100 },<br /> { name: 'HandledBy', index: 'HandledBy', align: "left", width: 80 },<br /> { name: 'Notes', index: 'Notes', align: "left", width: 120 },<br /> { name: 'Details', index: 'Details', align: "left", width: 120 },<br /> { name: 'Attachment', index: 'Attachment', jsonmap: "Attachment", align: "left", width: 0 },<br /> {<br /> name: 'Display', index: 'Display', align: "center", width: 100,<br /> formatter: function () {<br /> return " <input id="uxViewAtt" class="MyButton" type="button" value="Display" onclick="return OpenAttachment(event);"/>";<br /> }<br /> }<br /> ],<br /> rowNum: 5,<br /> rowList: [5],<br /> pager: "#ActivityGridMap",<br /> viewrecords: true,<br /> gridview: true,<br /> rownumbers: true,<br /> height: 60,<br /> width: 940,<br /> caption: 'Attachments'<br /> }).jqGrid('navGrid', '#ActivityGridMap', { edit: false, add: false, del: false, search: false });</div> |
|
1 |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top