This question is locked. New answers and comments are not allowed.
To start of and say that this is the issue because of the circular references, I know what the issue is, and I know how to deal with it. However, dealing with it in the proposed manner is not good enough.
So you have a model which has a relation...Say a Car, which has Tires, each Tire, belongs to a Car (one-to-many).
My goals are:
- To make a quick CRUD operation with inline edit within the grid and Ajax binding
- Not to repeat code in couple of places
- Do it quickly
So idea would be to just pass on a model to the grid, configure the grid with inline editing and it should work.
It doesn't because of the circular references issue (and I understand that). As my option is not to kill a relationship in the model on one side, my only other option is to introduce View Model into the story.
However, this idea only works correctly if my grid is read-only...if I want to make the grid also editable (inline), I also need validations and all other metadata which I have on my model also on my view model, so now I start leaking all over the place, copy pasting and stuff just to satisfy the norm.
I really hate being in this kind of loose-loose situation...I have all the functionality I need, grid supports ajax, inline editing, templates, all other neat stuff...only I cannot make the picture come together.
Are there any ideas or plans to help with this issue? I do believe I am not the only one who has it...and all because of circular references.
Kind regards,
Vladan Strigo
So you have a model which has a relation...Say a Car, which has Tires, each Tire, belongs to a Car (one-to-many).
My goals are:
- To make a quick CRUD operation with inline edit within the grid and Ajax binding
- Not to repeat code in couple of places
- Do it quickly
So idea would be to just pass on a model to the grid, configure the grid with inline editing and it should work.
It doesn't because of the circular references issue (and I understand that). As my option is not to kill a relationship in the model on one side, my only other option is to introduce View Model into the story.
However, this idea only works correctly if my grid is read-only...if I want to make the grid also editable (inline), I also need validations and all other metadata which I have on my model also on my view model, so now I start leaking all over the place, copy pasting and stuff just to satisfy the norm.
I really hate being in this kind of loose-loose situation...I have all the functionality I need, grid supports ajax, inline editing, templates, all other neat stuff...only I cannot make the picture come together.
Are there any ideas or plans to help with this issue? I do believe I am not the only one who has it...and all because of circular references.
Kind regards,
Vladan Strigo