使用jqGrid進行ASP.NET MVC路由

[英]ASP.NET MVC routing with jqGrid


I am trying to create a link to an url such as home/details/1 in a jqGrid column.

我正在嘗試在jqGrid列中創建指向url的鏈接,例如home / details / 1。

The documentation shows : showlink {baseLinkUrl: '', showAction: 'show', addParam:'&key=2'} Note: the addParam should contain &.

文檔顯示:showlink {baseLinkUrl:'',showAction:'show',addParam:'&key = 2'}注意:addParam應該包含&。

For example: formatter: ’showlink’, formatoptions: {baseLinkUrl: ’someurl.php’, addParam: ‘&action=edit’} This will output: http: // localhost / someurl.php?id=123&action=edit

例如:formatter:'showlink',formatoptions:{baseLinkUrl:'someurl.php',addParam:'&action = edit'}這將輸出:http:// localhost / someurl.php?id = 123&action = edit

Has anyone used the formatter to create routes instead of querystrings?

有沒有人用格式化程序來創建路由而不是查詢字符串?

1 个解决方案

#1


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.

我沒有使用jqGrid,但據我所知,你不應該為addParam設置任何東西,因為它只是將它作為QueryString附加。嘗試設置到baseLinkUrl的路由。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/07/23/724eed7b0ed04251d6e2dce6acc6263.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com