ASP.NET MVC与jqGrid的路由 [英] ASP.NET MVC routing with jqGrid
问题描述
我想创建一个链接到一个URL,例如在jqGrid的列中的首页/信息/ 1 即可。
I am trying to create a link to an url such as home/details/1 in a jqGrid column.
文档显示:
showlink {baseLinkUrl:'',的showAction:'秀',addParam:'和;键= 2'}注意:addParam应包含与放大器;.
The documentation shows : showlink {baseLinkUrl: '', showAction: 'show', addParam:'&key=2'} Note: the addParam should contain &.
例如:
格式:showlink',formatoptions:{baseLinkUrl:someurl.php',addParam:'和;行动=编辑'}
这将输出:HTTP://本地主机/ someurl.php ID = 123安培;行动=编辑
For example: formatter: ’showlink’, formatoptions: {baseLinkUrl: ’someurl.php’, addParam: ‘&action=edit’} This will output: http: // localhost / someurl.php?id=123&action=edit
有没有人用过格式创建的路线,而不是查询字符串?
Has anyone used the formatter to create routes instead of querystrings?
推荐答案
我没有用的jqGrid但据我所知,你不应该为 addParam
,因为这只会追加它作为查询字符串。试试你的路线设置为 baseLinkUrl
。
I've not used jqGrid but as far as I can tell, you should not set anything for addParam
, since that'll just append it as a QueryString. Try setting your route to the baseLinkUrl
.
这篇关于ASP.NET MVC与jqGrid的路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!