I want to add a link to EJ TreeGrid and I want pass the column's on href.
col.Field("NoteID")
.HeaderText("View")
.Width(80)
.TextAlign(TextAlign.Right)
.IsTemplateColumn(true)
.Template("<a href='" + @Url.Action("GetNoteID", "Notes") + "/" + "/{NoteID}' target='_blank'>View Broker Note</a>")
.Add();
How can I pass the pass NoteID on {NoteID} in the href link?
I tried:
.ClientSideEvents(eve =>
{
eve.QueryCellInfo("querycellinfo");
})`
`function querycellinfo(args) {
if (args.column.field === "NoteID" && args.cellValue != null) {
$(args.cellElement).find(".linkbtn").click(function () {
$.ajax({
type: "GET",
url: @Url.Action("GetNoteID", "Notes") + "/" + args.cellValue,
data: args.data,
dataType: "json"
});
})
}
}
but with no luck.