enzhu
05-25-2007, 10:06 AM
Hello everyone! I got another question about using grid.
My problem is I have a grid which display multiple rows of data. User should be able to change any value in the grid. There is also a "Submit" button. When user click on "Submit" button, I'll need to send everything in the grid to server. I have my grid here but I have no clue how to pass all the dataset to server. Could you let me know how I can do it? Thank you very much.
Here is my code for the grid:
<canvas width="800" height="600">
<dataset name="records" request="true" type="http" src="http:records.xml"/>
<dataset name="torecords" request="false" type="http" src="http:show.jsp"/>
<window x="20" y="20" width="700" height="500" title="Records">
<view layout="axis:y; spacing:10">
<grid datapath="records:/*">
<gridtext datapath="@name" width="150">Name</gridtext>
<gridtext datapath="@address" width="150">Address</gridtext>
</grid>
<button x="${parent.width/2-width/2}" width="80">Submit
<handler name="onclick">
var d = parent.parent.parent.torecords;
var p = new LzParam();
...
</handler>
</button>
</view>
</window>
</canvas>
My problem is I have a grid which display multiple rows of data. User should be able to change any value in the grid. There is also a "Submit" button. When user click on "Submit" button, I'll need to send everything in the grid to server. I have my grid here but I have no clue how to pass all the dataset to server. Could you let me know how I can do it? Thank you very much.
Here is my code for the grid:
<canvas width="800" height="600">
<dataset name="records" request="true" type="http" src="http:records.xml"/>
<dataset name="torecords" request="false" type="http" src="http:show.jsp"/>
<window x="20" y="20" width="700" height="500" title="Records">
<view layout="axis:y; spacing:10">
<grid datapath="records:/*">
<gridtext datapath="@name" width="150">Name</gridtext>
<gridtext datapath="@address" width="150">Address</gridtext>
</grid>
<button x="${parent.width/2-width/2}" width="80">Submit
<handler name="onclick">
var d = parent.parent.parent.torecords;
var p = new LzParam();
...
</handler>
</button>
</view>
</window>
</canvas>