As the title says, I'm trying to make a cell for each row a hyperlink using SlickGrid. I've been trying to insert it in the code behind (c#) but the grid doesn't seem to like html being passed into the field value - it displays the link as plain text.
I thought there might be a formatter for it but apparently not. Any ideas?
Cheers.
EDIT--------------
The examples say formatters should go when you declare the columns. @matma using your suggestion, would it be something like this:
{
name: "Action",
field: "link",
id: "link",
sortable: false,
width: 100,
var linkFormatter = function ( row, cell, value, columnDef, dataContext ) {
return '<a href="#/Link/' + dataContext['id'] + '">' + value + '</a>';
}
},
Sorry for being a bit cr@p.
ANSWER (for anyone who comes looking) ---------------------
{
name: "Action",
field: "link",
id: "link",
sortable: false,
width: 100,
formatter: linkFormatter = function ( row, cell, value, columnDef, dataContext ) {
return '<a href="#/Link/' + dataContext['id'] + '">' + value + '</a>';
}
},
So make your own formatter :) It's very simple in these case:
var linkFormatter = function ( row, cell, value, columnDef, dataContext ) {
return '<a href="#/Link/' + dataContext['id'] + '">' + value + '</a>';
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With