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
No data in jqgrid after reload though I can see data in loadcomplete event
27/11/2014
12:07
Avatar
ashish_sahu
New Member
Members
Forum Posts: 1
Member Since:
27/11/2014
sp_UserOfflineSmall Offline

Though there are many questions regarding this but i am still stuck.

I am using jqgrid 4.6 with loadonce true. I am trying to reload data from an external filter change event but i am not able to see that data in my grid.

I have also used below line to refresh still no success. This refresh do hits server method and returns JSON data. Which I am able to see in loadcomplete data param. When I hit the reload button in pager I can see data once. Afterwards hitting reload buttons also doesn't hit server( I tried writing refresh code in beforerefresh event function, but it doesn't even gets triggered)

jQuery("#RamTargetTable").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid');

Below is the code

 

jQuery("#RamTargetTable").jqGrid({
url: '<%=Url.Content("~/RamTarget/GetTargetData")%>',
width: 1220,
height: 250,
datatype: "json",
colNames: [my column names],
colModel: [my model],
emptyrecords: 'No Turbines found for the selected Plant',
searchoptions: { searchhidden: true },
mtype: 'GET',
loadonce: true,
hidegrid: false,
rowList: [],
pager: '#RamTargetTablePager',
viewrecords: true,
caption: "RAM Targets",
pgbuttons: false,
pginput: false,
pgtext: null,
grouping: true,
groupingView: {
groupField: ['SerialNumber'],
groupColumnShow: [true],
hideFirstGroupCol: [true]
},
editurl: '<%=Url.Content("~/RamTarget/AddEditRamTargets")%>',
checkOnSubmit: false,
reloadAfterSubmit: true
});

$('#RamTargetTable').jqGrid('navGrid', '#RamTargetTablePager', { edit: false, add: false, del: false, search: true});

function SendPlantId() {
var plantId = $("#lstPlant").val() == null ? 0 : $("#lstPlant").val();
$.ajax({
url: '<%=Url.Content("~/RamTarget/FilterGrid")%>',
type: "post",
data: { id: plantId, filter: "Plant" },
success: function(data) {
jQuery("#RamTargetTable").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid');
}
});
}

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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