Forum
07:07
30/10/2013
Hello, I am working environment is ASP.NET MVC 4, View Engine is Razor,
jQuery version is 2.0.3
jqGrid package version is 4.4.4
jQuery and jqGrid are using Nuget installed VisualStudio 2010
There is a paragraph in the View Page add JavaScript in jqGrid
------------------------------------------------------------------------------------------------------------------------------
<script type="text/javascript" language="javascript">
var jsonStr01 = $.parseJSON('[{ "UserId": "User 01 ", "UserPwd": "12345671 ","Did":"1234561"}]');
var jsonStr02 = $.parseJSON('[{ "UserId": "User 02 ", "UserPwd": "12345672 ","Did":"1234562"}]');
$("#MyJqGrid").jqGrid
({
datatype: 'json',
height: 250,
colNames: ['User ID', 'User Pwd','OID'],
colModel: [
{ name: 'UserId', index: 'Userid', width: 100 },
{ name: 'UserPwd', index: 'UserPwd', width: 100 },
{ name: 'Did', index: 'Did', width: 100 }
],
autowidth: true,
height: "100%",
gridview: true,
multiselect: true,
pager: '#pager',
rowNum: 10,
rowList: [10,20,30,40],
sortname: 'UserId',
sortorder: "asc",
viewrecords: true,
caption: "Form Detail"
});
$("#MyJqGrid").jqGrid('addRowData',1, jsonStr01);
$("#MyJqGrid").jqGrid('addRowData',2, jsonStr02);
</Script>
------------------------------------------------------------------------------------------------------------------------------
This is very strange MyJqGrid jqGrid displays only jsonStr01 this value rows.
No matter how many rows of data to increase addRowData, forever on the screen will only show the first time MyJqGrid increase row.
Anybody know how to solve this problem plugs do?
Thanks reply.
Most Users Ever Online: 715
Currently Online:
28 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66