我有一个非常简单的jQgrid我用于网站
<div id="catalogueSearchList" class="dataGrid">
<script type="text/javascript">
var catalogueSearchListConfig = {
id: 'catalogueSearchList',
action: 'List',
controller: 'Catalogue',
//href: '/Jobs/Adverts/',
onDblClick: function (id) { HERE!!! }) },
colNames: ['Name', 'CatalogueType'],
colModel: [
{ name: 'Name', index: 'Name', width: 400, align: 'left' },
{ name: 'Catalogue type', index: 'CatalogueType', width: 175, align: 'left' },
],
sortName: 'Name',
sortOrder: 'asc'
};
</script>
</div>
显示“HERE !!!”当观众双击jqgrid中的值时,我可以放在这里允许它将它们导航到另一个页面?
答案 0 :(得分:0)
没关系,答案是
<div id="catalogueSearchList" class="dataGrid">
<script type="text/javascript">
var catalogueSearchListConfig = {
id: 'catalogueSearchList',
action: 'List',
controller: 'Catalogue',
//href: '/Jobs/Adverts/',
onDblClick: function (id) { window.location.href = "/Catalogue/Category/" + id },
colNames: ['Name', 'CatalogueType'],
colModel: [
{ name: 'Name', index: 'Name', width: 400, align: 'left' },
{ name: 'Catalogue type', index: 'CatalogueType', width: 175, align: 'left' },
],
sortName: 'Name',
sortOrder: 'asc'
};
</script>
</div>
使用javascript,您只需选择窗口并将其位置设置为您喜欢的位置:)