I'm using KoGrid in order to make my custom Ajax grid.I don't know how to pass model element to some Javascrit method for generating a custom Template.
I tried like this and doesn't work:
PluginGrid.AjaxUrl("MyControler/GetGrid").Columns(
[
{ field: "UserName", displayName: "Model", width: "*", cellClass: "text-center", headerClass: "grid_width_270", cellTemplate: PluginHelpers.HtmlUserInformation($parent.entity, true) },
{ field: "StatusId", displayName: "Status", width: "*", cellClass: "text-center", headerClass: "text-center" }
]).Show("grid");
});
This is actually a wrapper over KoGrid.I want to pass the data model somehow, to my Js method :
PluginHelpers.HtmlUserInformation($parent.entity, true) }
When I do like this I received some undefined error of $parent variable.
Please advice,