Forum


22:43

05/07/2010

using jqGrid 3.4 and trying to get it to show the edit icon but it's not happening. using asp.net and MVC.
have a DropDownList, which triggers a call to the backend and returns data. That all is working good, the data displays in the grid fine and the paging works fine, just no edit/delete icons so i can continue with that functionality. been looking at it for hours, went back and reread the 3.4 documentation and don't see where i'm going wrong. any help would be appreciated.
Masterpage:
<
link rel="Stylesheet" media="screen" type="text/css" href="../../Content/themes/coffee/grid.css" />
<link rel="Stylesheet" href="../../Content/generic.css" />
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<script src="<%= Url.Content("~/Scripts/jgrid/jquery.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jgrid/jquery.jqGrid.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" type="text/javascript"></script>
Content Page:
$(window).ready(
function() {
$(
"#DropDownList").change(function() {
jQuery(
"#list").jqGrid().setGridParam({ url: 'pageurl?SomeQS=' + $("#DropDownList").attr("value")
}).trigger(
"reloadGrid");
});
});
jQuery(document).ready(
function() {
jQuery(
"#list").jqGrid({
clearGridData:
true,
mtype:
'GET',
datatype:
'json',
colNames: [
'Col1', 'Col2'],
colModel: [
{ name:
'Col1', index: 'col1', width: 250, sortable: false },
{ name:
'Col2', index: 'col2', width: 70, align: 'center', editable: true, edittype: "text", editoptions: { size: 20} }],
pager: jQuery(
'#pager'),
rowNum: 30,
//rowList: [25, 50],
sortname:
'id',
sortorder:
"Asc",
viewrecords:
true,
imgpath:
'/Content/themes/steel/images',
width:
'950',
height:
'100%'});
jQuery(
"#list").jqGrid('navGrid', '#pager', { edit: true, add: false, del: true, search: false });
});
Most Users Ever Online: 715
Currently Online:
68 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