Hello,
I am writing an order-entry app using AngularJS and Kendo UI Grid. I am new to both and am looking for some guidance on how best to approach the scenario below.
The order line grid is populated with Json data from a server (ASP.NET Web API). For example, for order # 3:
[ { "OrderId":3, "Line":1, "ItemId":"0023", "Description":"Alcaline substrat-234", "Class":"A34", "Manufacturer":"AA123", "PartNo":"12347354", "Qty":2, "ExtCost":12.72, "ExtPrice":19.10, "ExtTax":1.80, "Comment":"Some comment... Could be long...", Serials: [ "AAAA1234", "BBBB2222" ] }, { "OrderId":3, "Line":2, "ItemId":"0056", "Description":"Bee pulsating epox", "Class":"34", "Manufacturer":"ZB83", "PartNo":"52234623", "Qty":1, "ExtCost":252.31, "ExtPrice":290.11, "ExtTax":20.10, "Comment":"Some other comment about this line...", Serials: [ "AAAA1234", "BBBB2222" ] }]In the grid, I only display a few of the fields:
ItemNo, Description, Manufacturer, PartNo, Qty, ExtPrice
For adding and editing records, a custom pop-up form should display additional fields:
ItemNo (R/O):
Description (R/O):
Manufacturer (R/O):
PartNo (R/O):
Comment (not in grid):
Qty:
Price:
Serial Numbers (not in grid): (button which opens up S/N form)
There are two approaches that come to mind:
1) Do an additional json call to retrieve the edit-form fields (for editing) + another for saving the edits / new records. I would also reduce the fields in the json above to only include fields shown in the grid.
2) Use some kind of local caching to reduce the server round-trips. Perhaps Breeze (but I have never used it)? Need something simple, robust and AngularJS friendly.
3) ...?
Recommendations / advice would be appreciated!
A sample / JsFiddle or similar that shows how to use a custom edit form (preferably with some extra field [not in the grid]) with Kendo UI grid and AngularJs would also be very helpful.
Thanks,
Lars