how to bind data source: objects array in local storage with datatable

how to bind data source: objects array in local storage with datatable

yefimyefim Posts: 3Questions: 2Answers: 0

Hi, I got into problem, which despite of my attempts I can’t get though and I’ll appreciate any help.
I have a data table approximately of 10,000 records of products. User selects some of them and creates a LP problem which will be solved on server side. In case if problem does not have a solution user replaces some products in the model and makes another attempt. So this process may take several iterations. Therefore I would like to keep the data table on client side until the process is done. For this purpose I decided to use the local storage and “datatable”. Unfortunately I can’t figure out how connect an array of records which I got as View model:

      <script type="text/javascript" >

          var foods = @Html.Raw(JsonConvert.SerializeObject(this.Model.FoodsAll));

var data = foods.Data;

</script>
This data I want to keep in local storage for further adjustments in LP problem .

This discussion has been closed.