Server-Side Grid and fnAddData
Server-Side Grid and fnAddData
Hi there
Is it possible to have a server-side grid and then add some values with fnAddData without saving them to the database?
I would like to add "temporary" items which then will be saved after the form is completely filled out. That means the grid is part of the form and therefore it's not possible to save the new grid-value without saving the new entry from the form.
Maybe this is not possible... I would like to have server-side data loaded because there might be a bunch of records....
Thanks in advance for any help
regards
griti
Is it possible to have a server-side grid and then add some values with fnAddData without saving them to the database?
I would like to add "temporary" items which then will be saved after the form is completely filled out. That means the grid is part of the form and therefore it's not possible to save the new grid-value without saving the new entry from the form.
Maybe this is not possible... I would like to have server-side data loaded because there might be a bunch of records....
Thanks in advance for any help
regards
griti
This discussion has been closed.
Replies
It might be a bit of a tricky one this one, as you would then be getting data from two different locations (of the four types that DataTables supports) which isn't really supported.
What might be possible is, if you are using server-side processing and want to insert temporary rows, what you might be able to do is to use a fnServerData function, and modify the aaData array that is sent back from the server for each draw. You could simply inject a new row into that array. The only trouble I can see with this is that DataTables might cut the display off a little early (ie. you would be returning 11 rows instead of the expected 10). You might need to play with the display length properties to cope with this.
Regards,
Allan