Send grid's contents back to the server
I need to post to the server side the contents of the grid (those are generated by the user) in order to parse & insert them into a DB. Can anyone tell my the best way to do this?
I'm using an array to hold the data of the grid.
XML could be an option as well for holding data...
I've the same question and don't know how to solve this problem.
I am not sure, what do you mean by contents of the grid (those are generated by the user) :-(
Is your grid editable? Or some external JS is changing (add/remove) rows? Do you want to have trip to server per change or want to update whole grid at once?
I have done the first one and will be doing 2nd one very shortly.
1st one is pretty simple, it can be done using some hidden form or the same for which you have used for adding/editing the content.
Latter on sounds tougher. It can have many solutions
1> Build this URL http://server/script.ext?grid=string and document.location = url; (limitation: grid content size at max 255 bytes)
2> Make a hidden form with a textarea and set content of textarea with some encoded string translation (csv, key=value pair, xml, whatever) and sumbit the form. Server side can take care of parsing the content.
3> Something similar to Active.HTML.define("FORM"); (not sure how much work this will be). This will give dynamic form and we can add any number of form field inside it dynamically and submit it. (Alex, any comment?)
This topic is archived.
Back to support forum
Version 2Looking for AW 2.6 ?
The old site is here.