|
Rank: Newbie Groups: Member
Joined: 5/24/2011 Posts: 9
|
I am useing grid control which has cell ClientSideBeginEdit but when I am trying to handle ClientSideEndEdit this will work but column is shown empty
Trying to handle this from javascript
<script type="text/javascript" language="javascript"> function check_allcell(cell) { var schmID = 0; var value = cell.getValue(); // var grid = eo_GetObject("Grid1"); var index = cell.getItemIndex(); // var selectedItem = grid.getItem(index); // var opbal = selectedItem.getCell(6).getValue(); var stock = selectedItem.getCell(7).getValue(); var sales = selectedItem.getCell(8).getValue(); var scheme = selectedItem.getCell(9).getValue(); var sample = selectedItem.getCell(10).getValue(); var retqty = selectedItem.getCell(11).getValue(); var damage = selectedItem.getCell(12).getValue(); var stocktr = selectedItem.getCell(13).getValue(); var distributor = selectedItem.getCell(3).getValue();
// if (opbal == 'undefined') {opbal=0;} if (sales == 'undefined') {sales=0;} if (scheme == 'undefined') {scheme=0;} if (sample == 'undefined') {sample=0;} if (retqty == 'undefined') {retqty=0;} if (damage == 'undefined') {damage=0;} if (stocktr == 'undefined') {stocktr=0;} if (stock == 'undefined') {stock=0;} if (value == 'undefined') {value=0;} // if (opbal == null ) {opbal=0;} if (sales == null) {sales=0;} if (scheme == null) {scheme=0;} if (sample == null) {sample=0;} if (retqty == null) {retqty=0;} if (damage == null) {damage=0;} if (stocktr == null) {stocktr=0;} if (stock == null) {stock=0;} if (value == null) {value=0;} // if (isNaN(parseFloat(opbal))) {opbal=0;} if (isNaN(parseFloat(sales))) {sales=0;} if (isNaN(parseFloat(scheme))) {scheme=0;} if (isNaN(parseFloat(sample))) {sample=0;} if (isNaN(parseFloat(retqty))) {retqty=0;} if (isNaN(parseFloat(damage))) {damage=0;} if (isNaN(parseFloat(stocktr))) {stocktr=0;} if (isNaN(parseFloat(stock))) {stock=0;} if (isNaN(parseFloat(value))) {value=0;} //
var myschemeArray = document.getElementById("schemeArray"); if (myschemeArray == null) { //alert("schemeArray not found"); } else { var aString = myschemeArray.value; var iArray = aString.split(";"); for (i=0; i<= iArray.length-1; i++) { var xArray = iArray[i].split(","); // var saleFrom = xArray[2] ; if (saleFrom == 'undefined') {saleFrom=0;} if (saleFrom == null) {saleFrom=0;} if (isNaN(parseFloat(saleFrom))) {saleFrom=0;} // var saleUpto = xArray[3] ; if (saleUpto == 'undefined') {saleUpto=0;} if (saleUpto == null) {saleUpto=0;} if (isNaN(parseFloat(saleUpto))) {saleUpto=0;} // if (parseFloat(sales) >= parseFloat(saleFrom) && parseFloat(sales) <= parseFloat(saleUpto)) { var crData = false if (scheme==0) {scheme = xArray[4];selectedItem.getCell(9).setValue(scheme);crData=true;} if (sample==0) {sample = xArray[5];selectedItem.getCell(10).setValue(sample);crData=true;} if (crData == true ) {schmID = xArray[0];selectedItem.getCell(15).setValue(schmID);} break; } } } </script>
Thanks in advance
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Your code looks fine to us. If you still have problem, please try to isolate the problem into a test page and post the full test page. Make sure the code runs and only contain code needed to reproduce the problem. Once we have that we will be happy to take a look.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/24/2011 Posts: 9
|
above code is working fine for clientsidebeginedit ,when it is useing with clientsideendedit current cell would be shown blank
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, ClientSideEndEdit requires you to return the new value. See here for more details: http://doc.essentialobjects.com/library/1/jsdoc.public.handlers.grid_column_endedit.aspxThanks
|
|