Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Pete on May 22, 2008 08:22
open dhtmlx forum
Using Formintegration with two grids?

Hey there, Im using ur Grid. Now i have 2 grids and i get each one through the form to my update file. Now i want to know if it is possible to have send two grids with one POST? If not is there a way to include like simple text boxes to a grid? Thx guys
Answer posted by Support on May 22, 2008 10:10

>>if it is possible to have send two grids with one POST?

Basically yes, the latest version of code allows multiple grid coexists inside the same form tag - they all be submited with form.
The name of sent fileds includes the grid container ID , so it will be possible separate them on server side.

So just include both grids inside same form tag - no any additional code required.

Answer posted by Pete on May 22, 2008 10:52
Ok fixed the Problem with sending both grids at one time but how can i send the whole table even if nothing changed.

Thx
Answer posted by Pete on May 22, 2008 10:55
I did that but everytime the only one in POST is the active one where i made the last changes and not both of them, they are in the same form tag.

<form action="update.php" method="POST">
<div id="gridbox" width="280px" height="50" style="background-color:white;"></div>
<table width="800px"><tr><td><div id="gridbox2" width="165px" height="250" style="background-color:white;"></div></td><td><div id="gridbox3" width="480px" height="250" style="background-color:white;"></div></td></tr></table>
<input type="submit"></form>
Either i get the values for gridbox or gridbox3 but never both even if nothing is marked or active i get only one. And also not everyone just the changed ones but i want all fields comitted.

Pete
Answer posted by Pete on May 22, 2008 11:03
ah and mygrid.submitOnlyChanged(false); isnt working for still only the changed rows get thought the POST data.
Answer posted by Support on May 23, 2008 03:06

Please check attached sample - it puts two grids inside the same form - and all works correctly. 
( sample uses dhtmlxgrid.1.6 )

Attachments (1)