3.2.0

How to get freakin' input data to work in a freakin' grid!

About 10 hours of going through the support forum with mixed results. I'm trying to build a grid that takes input values in some columns and returns them to the server. An example is a price sheet with 3 columns:

product number, Description, Price

Unlike the AW examples, there is more than 1 row. 248 to be exact.

I've tried a number of methods from setting the column object to AW.Templates.Input to AW.UI.Input. Actually, AW.UI.Input would let me set a name property that was being returned to the server, but I did not get the value after updating the price.

My latest:

grid1.setId("grid1");
grid1.setColumnCount(4);
var str = new AW.Formats.String;
var num = new AW.Formats.Number;
var date = new AW.Formats.Date;
date.setDataFormat("ISO8601");
date.setTextFormat("mm/dd/yyyy");
var dollars = new AW.Formats.Number;
dollars.setTextFormat("##,###.##");
grid1.setCellTemplate(new AW.Templates.Checkbox, 3);
var in2 = new AW.Templates.Input;
grid1.setCellTemplate(in2, 2);
grid1.setCellFormat([str, str, dollars, str]);
grid1.setCellEditable([false, false, true, true]);
grid1.setHeaderText(myHeaders);
grid1.setRowCount(248);
grid1.setSelectionMode("single-cell");
grid1.setCellData(myText);
grid1.refresh();

I have a loop that runs to collect the data as described elsewhere in the forum.

Any help is appreciated!
Myshka
July 11,
Here is an example which sends modified cell data to the server via AJAX request -

http://www.activewidgets.com/grid.examples/saving-changed-cells.html

If you want to use normal form submit instead of the separate AJAX calls you possibly need to put the modified values instead into some hidden input tag.
Alex (ActiveWidgets)
July 15,
Hello,

I just posted an example how to do this through php.
http://www.activewidgets.com/javascript.forum.23557.0/example-php-update-database-with.html
Dries GERIS
August 17,

This topic is archived.

See also:


Back to support forum