Hi,
It is possible to update the values from a column from javascript? The idea is to have a image-button in the table header that have a function that would update more values on a time.
If is possible please answer as soon as possible.
Thank you!
Lidia
I'm not sure I know what you mean, but you can loop through and change the values of the cells in a certain column very easily in Javascript. Is that what you are looking for?
Ed
Yes, this is what we are looking for.
Could you give us an example of how to acces the grid , how to iterate and read the values, etc?
The ideea is to open a popup (a div from the same page), where to put some textboxes:
1. Number of rows (ex 10 from 50)
2. Value for the column 1 ( ex 2 --> 10 rows would have on the first column the value 2)
3. etc for the other columns
Lidia.
It's right, this worked.
Now, how can be accessed the header of one column and if it's hidden?
Here is a sample:
var grid = ig_controls["WebDataGrid1"];var gridrows = grid.get_rows();var totalrows = gridrows.get_length();
if (totalrows == 0) { return true;}
for (c = 0; c < totalrows; c++) { alert(gridrows.get_row(c).get_cell(7).get_value());}
You can use set_value to set the value of a cell. In this case, column 7 (which is really column 6 because it's a zero based index) would be retrieved.