Reputation: 4126
ive found that i can use this:
edittype:'select', formatter:'showlink', formatoptions:{baselinkurl:'EditReferance.cshtml'}
but it keep saying that my EditReference view does not excists.
My two columns:
name: 'id', index: 'id', width: 50, key: true, editable: true, editrules: { edithidden: false }, hidden: true }, { name: 'FirmaNavn', index: 'FirmaNavn', width: 100, align: 'center', editable: false, edittype:'select', formatter:'showlink', formatoptions:{ baselinkurl:'@Url.Action("EditReferance")'}},
Upvotes: 1
Views: 630
Reputation: 221997
Sorry, but I don't see any important different between the code from your answer and the code from your question. The 'showlink' formatter construct the following string op.baseLinkUrl+op.showAction + '?'+ op.idName+'='+opts.rowId+op.addParam
(see here). So if you use baseLinkUrl: '@Url.Action("EditReferance")'
or baseLinkUrl: '', showAction: '@Url.Action("EditReferance")'
you will have the same results.
You real problem was that you used **wrong case **in the names of property baseLinkUrl
of the showlink formatter. Instead of
formatter: 'showlink', formatoptions: {baseLinkUrl: '@Url.Action("EditReferance")'}
you used
formatter: 'showlink', formatoptions: {baselinkurl: '@Url.Action("EditReferance")'}
Upvotes: 2
Reputation: 4126
The Answer was very simple, your column should look like this:
{ name: 'FirmaNavn', index: 'FirmaNavn', width: 100, align: 'center', editable: false, edittype:'select', formatter:'showlink', formatoptions:{ baselinkurl:'', showAction: '@Url.Action("EditReferance")'}}
hope it helps to someone
Upvotes: 0