I have a webservice which returns data and I build a list of viewmodels. From that list I want to create a table (using [login to view URL]). The result should be what the attached [login to view URL] looks like. It should be fairly easy for someone with knockout.js experience and datatables.net.
This is how I am calling the .js file from the html:
<script language="javascript" type="text/javascript">
jQuery(function ($) {
var moduleId = parseInt("[ModuleContext:ModuleId]");
var localizedSettings = {};
var viewmodel = new [login to view URL](moduleId, localizedSettings);
[login to view URL]();
[login to view URL](viewmodel, $("#Items-" + moduleId)[0]);
});
</script>
This is the data from the webservice:
"{"projectid":1,"title":"Project Title A","description":"description of the project A is here and it's good","budget":"150-12","budgetcur":"GBP","deadline":"2018-09-01T00:00:00","expires":"2018-09-01T00:00:00","datecreated":"2018-03-05T00:00:00","createdbyuserid":1,"categories":[{"CategoryID":1,"Name":"Audit","Active":null,"PortalID":null,"FinSubcategories":[{"SubCategoryID":1,"Name":"External Audit","CategoryID":null,"Active":null,"PortalID":null},{"SubCategoryID":2,"Name":"Internal Audit","CategoryID":null,"Active":null,"PortalID":null}]},{"CategoryID":2,"Name":"Investigation","Active":null,"PortalID":null,"FinSubcategories":[]}],"standards":[{"StandardsID":2,"Name":"IFRS","Country":null,"PortalID":null}],"industries":[{"IndustryID":1,"Name":"Aerospace and Defence","PortalID":null},{"IndustryID":2,"Name":"Agriculture","PortalID":null}],"reqindustries":[{"IndustryID":8,"Name":"Food and Beverage","PortalID":null}],"reqcompanysize":[{"SizeID":2,"Size":"Small"},{"SizeID":3,"Size":"Medium"},{"SizeID":4,"Size":"Large"}],"files":[{"FileID":"aF_2BhAyDMA%3d","FileName":"financial statement [login to view URL]"},{"FileID":"hoaRdjYvhJ4%3d","FileName":"ledger company [login to view URL]"}],"distance":20,"specifications":[{"categoryname":"Audit","specvalue":"100","specname":"Years "},{"categoryname":"Audit","specvalue":"15-05-2018","specname":"Period From"},{"categoryname":"Audit","specvalue":"16-06-2019","specname":"Period To"},{"categoryname":"Investigation","specvalue":"GBP","specname":"Transactions Currency"},{"categoryname":"Investigation","specvalue":"EUR","specname":"Reporting Currency"}],"portalid":0,"editUrl":null}"