I have a listview that is bound to an MVC controller, the view populates fine and pages fine, I would like to enable adding a new listview item so I added a template with a single textbox bound to an autocomplete that also populates from the server. All that works fine, but when I invoke the add on the listview, it is immediatly added to the listview and then the call appears in the controller. If the add executes then all is fine, if not then it is out of sync and there is no way to indicate to the listview to refresh or that an error occured. I have tried returning errors in the same way a Grid expects them (JSON object with Data, Errors and Total), I have tried simply returning a 500 error, but I cant get seem to figure out how to indicate that the operation failed.
Attached are the razor view, the editor temmplate and the controller.
Thanks in advance for any advice
Attached are the razor view, the editor temmplate and the controller.
Thanks in advance for any advice