KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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>'; } },
Tags (comma-separated)
Save Edits
Cancel