Forum
09:47
30/07/2009
I have been all over trying to solve this problem and can't seem to put my finger on it. The environment is ASP.NET MVC.
Here is the grid setup:
var List = function() {
return $("#MarketValuationAppraisalForm #MarketValuationAppraisalList")
};
List().jqGrid({
url: '<%= ResolveUrl("~/Appraisal/List") %>/?projectId=' + Project(),
datatype: 'json',
mtype: 'GET',
colNames: ['PropertyId', 'ArtifactId', 'Issue Date', 'Document', 'Action', 'Submitted', 'Creator'],
colModel: [
{ name: 'PropertyId', index: 'PropertyId', hidden: true, width: 150, align: 'left', editable: false },
{ name: 'ArtifactId', index: 'ArtifactId', hidden: true, width: 150, align: 'left', editable: false },
{ name: 'Date', index: 'Date', width: 150, align: 'left', editable: false },
{ name: 'Document', index: 'Document', width: 1000, align: 'left', editable: false },
{ name: 'Action', index: 'Action', width: 150, align: 'left', editable: true, edittype: "select", editoptions: { value: "<%= ArtifactAction.Get(EnumArtifactTypes.Appraisal) %>"} },
{ name: 'CreateDate', index: 'CreateDate', width: 150, align: 'left', editable: false },
{ name: 'Creator', index: 'Creator', width: 150, align: 'left', editable: false }
],
onSelectRow: function(id) {
if (id && id !== lastsel2) {
List().restoreRow(lastsel2);
List().editRow(id, true);
lastsel2 = id;
}
},
rowList: [5, 10, 20],
sortorder: "asc",
altRows: true,
height: '100%',
scroll: true,
autowidth: true,
viewrecords: true,
pager: jQuery('#MarketValuationAppraisalForm #pagered'),
sortname: 'Date',
caption: 'Apparaisal',
editurl: '<%= ResolveUrl("~/Artifact/UpdateAction") %>',
imgpath: '/Content/jQueryGrid/themes/coffee/images'
}).navGrid("#MarketValuationAppraisalForm #pagered", { edit: false, add: false, del: true }
);
I have inserted alerts and all seems to be functioning ok. I actually get into edit mode but when I step off the post does not occur.
Here is the server side:
[Authorize]
[AcceptVerbs(HttpVerbs.Post)]
public void UpdateAction(string id, string actionType, string action)
{
string s = action;
}
I have tried both a post and get.
Here are the js files I am using. Note I am using 3.5.
<script src="../../Scripts/jqGrid/JqGridLanguage/grid.locale-en.js" type="text/javascript"></script>
<script src="../../Scripts/jqGrid/grid.treegrid.js" type="text/javascript"></script>
<script src="../../Scripts/jqGrid/grid.common.js" type="text/javascript"></script>
<script src="../../Scripts/jqGrid/grid.base.js" type="text/javascript"></script>
<script src="../../Scripts/jqGrid/jqDnR.js" type="text/javascript"></script>
<script src="../../Scripts/jqGrid/jqModal.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.jqGrid.min.js" type="text/javascript"></script>
Many Thanks!
Jerry
Most Users Ever Online: 715
Currently Online:
50 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