I have a Webdatagrid with a DropDownProvider for one column. Now the user can select a value with this DropDown editor. After that I want to change the values of two other rows depending on that selection.For that I tried to use the ExitedEditMode Event for the cell edited by the DropDown and got the new selected value of that cell. But I can get it working writing the new values in the other cells. May be I have to call an other function that the row is "refreshed". Can anybody give me a hint?
I'm using Visual Studio 2010 and NetAdvantage version 2010 Vol.3
Never mind! I have figured out myself. I tried it a wrong way.It works using code like this:
cell.set_value(newValue)
Hi there!
Gee, I am trying that too but I get a JScript error message stating that there is not enough stack memory. After my call to cell.set_value(...).
This is what I do:
function WebDataGrid1_Editing_CellValueChanged(sender, eventArgs) { var grid = $find("<%= WebDataGrid1.ClientID %>"); var row = eventArgs._cell._row; var value1 = 0; var value2 = 0; for (var j = 0; j < row.get_cellCount(); j++) { var cell = row.get_cell(j); var value = String(cell.get_value()).toLowerCase(); if (cell._column._key == "Value1") { value1 = parseInt(value); } else if (cell._column._key == "Value2") { value2 = parseInt(value); } else if (cell._column._key == "Result") { if (!isNaN(value1) && !isNaN(value2)) { var result = value1 + value2; cell.set_value(String(result)); } else { cell.get_element().innerHTML = "n/A"; } } } }
The debugger stops on a line in some auto-generated javascript file:
return function() { return method.apply(instance, arguments); //crash here }
Any idea?
Edit: Working with NetAdvantage 10.3, IE 8
Martin,
Could you please share the code you've written to accomplish this?
Thanks