Forum


06:27

Good Morning at all, I'am a italian boy,
I saw that the jqGrid will not work if applied to a different location to / View / Home / Action.
Someone can help me solve this problem.
I do like this, I put the files on the MasterPage:
src="../../Scripts/jquery-1.3.2.js" <script type="text/javascript"> </ script>
src="../Scripts/jquery.jqGrid.js" <script type="text/javascript"> </ script>
src="../../Scripts/jqGridJs/jqModal.js" <script type="text/javascript"> </ script>
src="../../Scripts/jqGridJs/jqDnR.js" <script type="text/javascript"> </ script>
and on the pages that I view the server jqGrid
I put this:
jQuery (document). ready (function () (
jQuery ( "# list"). jqGrid ((
url: '/ Log / LinqGridData',
datatype: 'json',
mtype: 'GET',
colNames: [ 'IdLog', 'Username', 'Date'],
colModel: [
(Name: 'IdLog', index: 'IdLog', width: 40, align: 'left'),
(Name: 'Username', index: 'Username', width: 40, align: 'left'),
(Name: 'Date', index: 'Date', width: 400, align: 'left')],
pager: jQuery ( '# pager'),
rownum: 10
rowList: [5, 10, 20, 50],
sortname: 'IdLog',
sortorder: "desc",
viewrecords: true,
height:'100% ',
width:'100% ',
caption: 'My first grid'
));
));
</ script>
</ asp: Content>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<h2>
My Grid Data </ h2>
<table id="list" cellpadding="0" cellspacing="0">
</ table>
<div id="pager" style="text-align: center;">
</ div>
public ActionResult LinqGridData (string sidx, sord string, int page, int rows)
(
LogRepository lr = new LogRepository ();
var movieList = lr.VisualizzaLog ();
int totalRecords = movieList.Count ();
totalPages int = (int) Math.Ceiling ((float) totalRecords / (float) rows);
var = new jsonData
(
total = totalPages,
page = page,
records = totalRecords,
rows = (
from m in movieList
select new
(
i = m.IdLog,
cell = new string [] (
m.Username.ToString (), m.Data.ToString ()
)
)
). ToArray ()
);
return JSON (jsonData);
)
the problem is that I do not see the fields and ie all the parameters are invalid.
I despair!

Thank you
Most Users Ever Online: 715
Currently Online:
191 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