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.
Monday, July 12, 2004
XML could be an option as well for holding data...
Monday, July 19, 2004
Please!!!! somebody answer this!!
I've the same question and don't know how to solve this problem.
Thursday, July 22, 2004
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
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?)