I really hope someone can assist me. I am new to MVC and Telerik Controls. I have use the Jquery version of the Telerik Grid to display lists of parent data from my database and implemented server paging/sorting etc and this has gone well so far.
I have a list of Issues and when an item is double clicked, an issue detail view is opened (this is a razor view, with additional information to display to that contained in the grid). I have done this by implementing a jquery call on the double click of the kendo grid. (If there is a nicer way to do this using the popup mode please could someone let me know as I found popup mode relied on the data available to the grid??)
The issue detail view need to present a list of all issue comments related to the issue and allow adding/editing and removing of them.
I would like to use the kendo grid for this list too as their may be a lot of comments and I would like to implement paging for them.
I have EF as my data layer with unit of work and repository pattern and a business layer with business models. I am then translating to View models and currently I have an Issue view model with a List<IssueCommentsVM> property populated.
However, I am currently getting the data for IssueComments via the grids read operation to a 'GetIssueComments' action on the controller.
Issues I am having:-
- I need to be able to create a new issue and add multiple issue comments to the grid and save both the issue and the issue comments entered at the same time
- When editing an issue, there may be a lot of comments, so I would like server side paging/filtering/sorting implemented, but when I change the page/filter etc, my edits will be lost??
Is there a good way of getting the kendo grid to add/edit and delete Issue Comments in bulk edit style way, maintaining state if pages are changed or filtering is applied so that when they save the Parent Issue, the child Issue Comment changes are all passed to the Issue Save action method.
I was thinking maybe there is a way to bind the grid to the parent models child data List<IssueCommentVM> and getting add/edit/delete to post and update this model and refresh the page and hence child grid, but then how would I handle paging etc as I don't want to return all comments to the parent model, just the requested page, but I still need to save changes.
Can anyone help me out, this seems so complicated, there has to be something I am missing in my understanding.