Hi All,
I am trying to submit one form having a grid in it. only example/demo so far which fits my needs is below:
sample used for posting form with grid
On top of that i did some small change and i am getting an issue.
Issue:
The above given sample works fine and i can see that what ever changes were made to grid at client side, those all get posted to server when save is clicked.
but if i enable popup editing in grid, then none of items of grid data contains information on whether they were newly added or updated, same time deleted items are not coming in grid's destroyed list.
Please find attached sample(with said issue) which is exact same copy as sample with below changes:
1. enabled editing sing popup editor
2. using custom popup editor - named orderdetails
With this when i click on save, senddata js function is called but all array items which are sent to server in save ajax call are empty list. when i debugged i can see they are all empty as i am not getting dirty/isnew() giving true for added/edited rows. also grid.dataSource._destroyed.length is also 0, even after deleting few rows from grid.
Please help me solve this issue in this sample. Thanks.
Other more related query but not an issue:
In sample which i referred, list is maintained in static variable in controller, but i can't use static as that way it will be same list for all my users,
so wanted to know is there any built in support in grid where in i can just have read of datasource defined to read from db(controller action) on first load,
and then further add/update/delete happens at client side only and still it shall allow me to have popup editing enabled?
Note: I don't want to use session as unsaved data might be huge.
I am asking this as i understand if i remove update action from data source, then i can't enable editing, else grid throws error saying update is must to enable editing.
I am trying to submit one form having a grid in it. only example/demo so far which fits my needs is below:
sample used for posting form with grid
On top of that i did some small change and i am getting an issue.
Issue:
The above given sample works fine and i can see that what ever changes were made to grid at client side, those all get posted to server when save is clicked.
but if i enable popup editing in grid, then none of items of grid data contains information on whether they were newly added or updated, same time deleted items are not coming in grid's destroyed list.
Please find attached sample(with said issue) which is exact same copy as sample with below changes:
1. enabled editing sing popup editor
2. using custom popup editor - named orderdetails
With this when i click on save, senddata js function is called but all array items which are sent to server in save ajax call are empty list. when i debugged i can see they are all empty as i am not getting dirty/isnew() giving true for added/edited rows. also grid.dataSource._destroyed.length is also 0, even after deleting few rows from grid.
Please help me solve this issue in this sample. Thanks.
Other more related query but not an issue:
In sample which i referred, list is maintained in static variable in controller, but i can't use static as that way it will be same list for all my users,
so wanted to know is there any built in support in grid where in i can just have read of datasource defined to read from db(controller action) on first load,
and then further add/update/delete happens at client side only and still it shall allow me to have popup editing enabled?
Note: I don't want to use session as unsaved data might be huge.
I am asking this as i understand if i remove update action from data source, then i can't enable editing, else grid throws error saying update is must to enable editing.