0

Hi I have developed the jqgrid in my mvc web application by using jquery in .net. I am able to show hyperlink to call action from controller. But My form has some download links. how to configure download link and show multiple download link in single cell ? these links are in variable in numbers so can not keep columns for each link. so best way to put all links in single cell. I am using C# as code behind.

Red Swan
  • 15,157
  • 43
  • 156
  • 238

1 Answers1

0

You can use Custom Formatter to create two links in one cell. The implementation could be a little different depend on the form in which you return the data to the jqGrid from the server (depend on j). The third parameter of the custom formatter rowObject contain the data of the row in the for in which you send it from the server.

In some situation you will be need to define Custom Unformatter also which are used to get the data back from the formatting cell. For example if you allow sorting of the column (if you don't use sortable:false) the data from the custom formatted column must be read and compared. In the case Custom Unformatter is needed.

If you will have problem with the implementation you should append your question with more information,

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • I can get the different values in array from controller which to be shown as hyperlink in single cell of JQGrid. But facing trouble in formatting the grid as I want to create a hyperlink for each array item and then call controller method for each links. Please advise me how can I achieve that. – tom Nov 04 '14 at 16:13
  • 1
    @tom: You can salve the problem using of custom formatter or using [formatter: "dynamicLink"](https://github.com/OlegKi/jqGrid-plugins/blob/master/jQuery.jqGrid.dynamicLink.js) described in [the answer](http://stackoverflow.com/a/9048483/315935) (see [the answer](http://stackoverflow.com/a/17236943/315935) too). You can post new question where you describe the problem on some test data. – Oleg Nov 04 '14 at 16:32