When Adding a model to my grid via a controller action, it is possible that there may be more than one model created as a result of the process.
Normally, when only one item is added, we are sending the created or updated Model back to the View by calling:
Where "singleModelRecord" is a single model.
However, in this case, I would like to be able to send a List of Models back to the client, and have all the rows added to the grid, instead of having just one of them added, and needing to refresh the grid to see the rest. This is what I was trying, but only one new model was being shown in the grid:
where "arrayOfModels" is the array of Models that have just been created.
Is this functionality supported?
Normally, when only one item is added, we are sending the created or updated Model back to the View by calling:
return this.Json((new Model[] { singleModelRecord }).ToDataSourceResult(request, this.ModelState));
However, in this case, I would like to be able to send a List of Models back to the client, and have all the rows added to the grid, instead of having just one of them added, and needing to refresh the grid to see the rest. This is what I was trying, but only one new model was being shown in the grid:
return this.Json(arrayOfModels.ToDataSourceResult(request, this.ModelState));
Is this functionality supported?