Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Changed fields doesn't persist after edit-mode

    Hi,

    We are working with listgrids and selectboxes in listgrid. In SC10 there is an issue updating fields in the listgrid.

    After doubleclick on the first column, you can select "select zzz" and the value of the second column changes. If you then press enter or if you click on the second row you will see that the value in the second column is changing back. Besides that the changed record, doesn't refect the changes which have been made.
    Please run the code below to repoduce the issue.

    We currently using SmartClient_v100p_2014-10-21_Pro and could reproduce this issue with all browsers (firefox, chrome, IE11)

    Here is the code you can reproduce this:
    Code:
    isc.ListGrid.create({
    	"ID" : "theListGrid",
    	"width" : "400",
    	"editEvent" : "click",
    	"alternateRecordStyles" : true,
    	"modalEditing" : true,
    	"fields" :
    	[{
    			"name" : "selectField",
    			"title" : "selection",
    			"canEdit" : true,
    			"editorType" : "SelectItem",
    			"editorProperties" : {
    				"changed" : function (p1, p2, p3) {
    					var record = theListGrid.data.find("indexName", theListGrid.getEditRow() + 1);
    					if (p3 == "1")
    						record.valueField = "XXXX";
    					if (p3 == "2")
    						record.valueField = "YYYY";
    					if (p3 == "3")
    						record.valueField = "ZZZZ";
    					theListGrid.markForRedraw();
    				}
    			},
    			"valueMap" : {
    				1 : "Select x",
    				2 : "Select y",
    				3 : "select z"
    			}
    		}, {
    			"name" : "valueField",
    			"title" : "value",
    			"type" : "text",
    			"canEdit" : false
    		}
    	],
    
    	"data" :
    	[{
    			"indexName" : "1",
    			"selectField" : 1,
    			"valueField" : "XXXX"
    		}, {
    			"indexName" : "2",
    			"selectField" : 1,
    			"valueField" : "XXXX"
    		}
    	]
    })
    Best Regards
    Simon

    #2
    It looks like you're attempting to directly modify records in the midst of the changed handler firing. This would not be expected to work and if you ever saw it work in a previous version, that was basically a fluke and not something supported.

    To do this correctly, you need to work with the editValues system used for ListGrid editing - see the Grid Editing overview.

    Comment


      #3
      ok, seems reasonable to use setEditValues, if you want to set changes in the LisGrid (which are also marked as edited and returned in the resutl of getAllEditRows()).

      What is the recommended api to update fields of a record or multiple records, without having the updated rows in getAllEditRows. In our case we are upgrading different rows/records after one row was changed.

      The approaches by now are these, but everyone of this have it's own downsize, and i think there might be an unknown api for this problem.
      - updateDate seems only to handle responses from the datasource.
      - calling saveAllEdits after each setEditValues also seems to be not the best solution.
      - updating the record in the ListGrid.data is also not suitable, because the listgrid may not redraw the changes

      best regards

      Comment


        #4
        In short - if you have edits for a row and you want to modify the edit values, use setEditValues / setEditValue.
        If you want to modify a record
        - if you're dealing with a databound grid, use the DataSource APIs - typically updateData() [that will actually save to the DataSource]
        - if you're dealing with a grid with data set to an array, modify the array, and then explicitly call 'dataChanged()' on the data array.

        The case you hit was slightly tricky - when the user is actually editing a row (so the live edit form is showing), we have logic to check whether the user has made any edits (comparing the form's values to the underlying data value). If there's a delta, it's assumed that the edit form's field value has been changed, so the form version is stored. That's what was overriding your change to the record, and a call to 'setEditValue()' would have fixed it.

        Please let us know if you still can't get things to behave as you'd like


        Regards
        Isomorphic Software

        Comment


          #5
          Thanks for the explanation. So it seems like i have searched for the unknown "dataChanged()" method.

          We also have a problem setting new data, while the user is actually editing a row. (An example is at the end of this post)

          After changing a selectbox, a changed event on the selectbox is fired and goes to the backend. Depending on the changes the user has made, some data in the rows (in other fields) are changed and also saved in the backend.
          Because the changes are already saved, the gui has to be updated to the current data (by now we are still in the change event). So we are creating a response on the server which manipulates the current listgrid row (or maybe multiple rows).

          Updating a row without currently editing seems to work with the described dataChanged() on the data of the listgrid. But if the user is currenlty editing the row, which should be updated, its not correctly displayed and results in a little chaos in the "getAllEditRows"-result.
          If you want to change a text-field in the listgridfield, the value is correctly displayed. If you want to update the value of a selectbox this update is not correctly displayed.
          You have also the problem after pressing enter in the edited row the values in the selectbox are marked as changed(blue color) and the changes in the textfield are now replaced with the values at the beginning of the editing. Also the row is now marked as edited and is in the result of "getAllEditRows()". Therefore it would be sent in the next request to our server as changed, but it is not changed, because we have set the row of the listgrid with the correct values after the change of the selectbox.

          I have serveral issues
          - changing the data of the listgrid and calling dataChanged does not change the selected values of the editor of the selectbox
          - changing the data of the listgrid and calling dataChanged does change the display of the not editable textfield correctly. But i assume there is also an editor, whose value is not correctly set and therefore results in a change after the edit.
          - because of the changes which are not correctly pushed to the editors the data from the textfields and selectboxes are not different to the underlaying data and resutls to a changedRow, which it isn't.

          This effect is also visible in an example.
          To reproduce the issues above you have to doubleclick on the "Select One" record. If you change the "Select One" row, the "Select Two" should also have the same value. The Fields "BackSelect 1", "BackSelect 2", "BackSelect 3" should have a new value, too. At the end the "Price" field also should be updated. So after changing "Select One" you can see that the other selectboxes don't change, but the price-field changes. After hitting enter to leave the edit-mode the values in the selectbox are there (marked as blue) and the old value of the price-field is displayed again.

          If we set the data and are calling "dataChanged()" i think the new data should also be pushed to the textfields and select-boxes (and all other open edit-fields). Therefore the function would be correct if no additional edit is taken from the user in this row.


          Code:
          function changedSelectOneField(p3){
          	theRealEditedRow = theListGrid.getEditRow();
          	var i = theRealEditedRow;
          	var theEditedRowIndex = i;
          	var index = theEditedRowIndex
          	var record = theListGrid.data[theEditedRowIndex];
          	console.log(index);
          	var updatedData = {};
          	if(theRealEditedRow == i){
          		record.checkBox1Field = true;
          		record.checkBox2Field = false;
          		record.selectOneField = p3;
          		record.backSelect1Field=2;
          		record.costObjectiveListGridField="Keine";
          		record.ayDateColumn="Mi, 22.10.2014";
          		record.backSelect2Field=3;
          		record.priceField= "-4,80 €";
          		record.backSelect3Field=3;
          		record.selectTwoField = p3;
          		var sum = (record.backSelect1Field + record.backSelect2Field + record.backSelect3Field);
          		record.priceField = sum+",00 €";
          		record.sumField = (parseInt(p3)+parseInt(p3)+ sum)+",00 €";
          	}
          	theListGrid.data.dataChanged();
          }
          function changedSelectTwoField(p3){
          }
          function change1(){
          }
          function change2(){
          }
          function change3(){
          }
          isc.ListGrid.create(
                    {
          			autodraw: true,
                     "ID":"theListGrid",
                     "width":"100%",
                     "height":"100%",
                     "hideUsingDisplayNone":false,
                     "leaveScrollbarGap":true,
                     "selectionType":"single",
                     "canEdit":true,
                     "canEditCell":function (rowNumber, columNumber) {
          				if (rowNumber == 0 && (columNumber == 2 ||  columNumber == 8))
          					return false;
          				return this.Super('canEditCell', arguments);
          		   },
                     "editEvent":"click",
                     "autoSaveEdits":false,
                     "alternateRecordStyles":true,
                     "modalEditing":true,
                     "timeFormatter":"toShort24HourTime",
                     "sortField":"nil",
                     "sortDirection":"ascending",
                     "fixedRecordHeights":false,
                     "neverValidate":true,
                     "selectionProperty":"isSelected",
                     "showRecordComponents":true,
                     "showRecordComponentsByCell":true,
                     "canGroupBy":false,
                     "canPickFields":false,
                     "clwGeneratedIndexName":"daysListGridGeneratedIndex",
                     "fields":
                     [
                      {
                       "name":"dayDateColumn",
                       "title":"Date",
                       "type":"text",
                       "align":"right",
                       "width":200,
                       "canEdit":false
                      },
                      {
                       "name":"selectOneField",
                       "title":"Select one",
                       "canEdit":true,
                       "canSort":false,
                       "editorType":"SelectItem",
                       "showValueIconOnly":false,
                       "suppressValueIcon":true,             
                       "editorProperties":
                       {
                        "ID":"selectOneField_Editor",
                        "changed":function (p1, p2, p3) {changedSelectOneField(p3)},
                        "suppressValueIcon":true,
                        "prompt":"",
                        "textMatchStyle":"substring"
                       },
                       "valueMap":
                       {
                        1:"Burger",
                        2:"Pommes",
                        3:"Pizza",
                        4:"Cola",
                        5:"Beer",
                        6:"Water",
                        7:"Ham",
                        8:"Chicken",
                        9:"Beacon",
                        10:"Peach",
                        11:"Banana"              
                       }
                      },
                      {
                       "name":"selectTwoField",
                       "title":"Select two",
                       "formatCellValue":function (value, record, rowNum, colNum ) {
          				if( rowNum == 0 ){return null}else{return value;}},
                       "canEdit":true,
                       "canSort":false,
                       "editorType":"SelectItem",
                       "emptyCellValue":"n\/a",
                       "showValueIconOnly":false,
                       "suppressValueIcon":true,             
                       "editorProperties":
                       {
                        "ID":"selectTwoField_Editor",
                        "changed":function (p1, p2, p3) {changedSelectTwoField(p3)},
                        "suppressValueIcon":true,
                        "textMatchStyle":"substring"
                       },
                       "valueMap":
                       {
                        1:"Burger",
                        2:"Pommes",
                        3:"Pizza",
                        4:"Cola",
                        5:"Beer",
                        6:"Water",
                        7:"Ham",
                        8:"Chicken",
                        9:"Beacon",
                        10:"Peach",
                        11:"Banana",
                        12:"n\/a"
                       }
                      },
                      {
                       "changed":function (p1, p2, p3) {},
                       "name":"backSelect1Field",
                       "title":"BackSelect 1",
                       "width":80,
                       "canEdit":true,
                       "canSort":false,
                       "editorType":"SelectItem",
                       "editorProperties":
                       {
                        "changed":function (p1, p2, p3) {change1()},
                        "prompt":"",
                        "textMatchStyle":"substring",
                        "ID":"backSelect1Field_Editor"
                       },
                       "valueMap":
                       {
                        1:"Yes",
                        2:"Maybe",
                        3:"No"
                       }
                      },
                      {
                       "changed":function (p1, p2, p3) {},
                       "name":"backSelect2Field",
                       "title":"BackSelect 2",
                       "width":78,
                       "canEdit":true,
                       "canSort":false,
                       "editorType":"SelectItem",
                       "editorProperties":
                       {
                        "changed":function (p1, p2, p3) {change2()}              
                       },
                       "valueMap":
                       {
                        1:"Yes",
                        2:"Maybe",
                        3:"No"
                       }
                      },
                      {
                       "changed":function (p1, p2, p3) {},
                       "name":"backSelect3Field",
                       "title":"BackSelect 3",
                       "width":78,
                       "canEdit":true,
                       "canSort":false,
                       "editorType":"SelectItem",
                       "editorProperties":
                       {
                        "changed":function (p1, p2, p3) {change3()},
                        "textMatchStyle":"substring",
                        "ID":"backSelect3Field_Editor"
                       },
                       "valueMap":
                       {
                        1:"Yes",
                        2:"Maybe",
                        3:"No"
                       }
                      },
                      {
                       "name":"priceField",
                       "title":"Price",
                       "type":"text",
                       "align":"right",
                       "width":55,
                       "canEdit":false,
                       "canSort":false
                      },
                      {
                       "changed":function (p1, p2, p3) {},
                       "name":"checkBox1Field",
                       "title":"Tag",
                       "type":"boolean",
                       "width":45,
                       "canEdit":true,
                       "canSort":false,
                       "canToggle":false,
                       "editorProperties":
                       {
                        "ID":"checkBox1Field_Editor"
                       }
                      },
                      {
                       "changed":function (p1, p2, p3) {},
                       "name":"checkBox2Field",
                       "title":"Nacht",
                       "type":"boolean",
                       "width":45,
                       "canEdit":true,
                       "canSort":false,
                       "canToggle":false,
                       "editorProperties":
                       {
                        "ID":"checkBox2Field_Editor"
                       }
                      },
                      {
                       "name":"sumField",
                       "title":"Sum Prize",
                       "type":"text",
                       "align":"right",
                       "width":62,
                       "canEdit":false,
                       "canSort":false
                      }
                     ],
                     "members":
                     [],
                     "data":
                     [
                      {
                       "checkBox1Field":true,
                       "checkBox2Field":false,
                       "selectOneField":2,
                       "sumField":"12,00 €",
                       "backSelect1Field":1,
                       "dayDateColumn":"Mi, 22.10.2014",
                       "backSelect2Field":3,
                       "priceField":"-4,80 €",
                       "backSelect3Field":3,
                       "selectTwoField":12
                      },
                      {
                       "checkBox1Field":true,
                       "checkBox2Field":true,
                       "selectOneField":6,
                       "sumField":"122,00 €",
                       "backSelect1Field":1,
                       "dayDateColumn":"CHANGE THIS and PRESS ENTER --->",
                       "backSelect2Field":1,
                       "priceField":"-41,00 €",
                       "backSelect3Field":1,
                       "selectTwoField":6
                      }
                     ]
                    }
                    )
           isc.Button.create({
          	left:500,
          	top:320,
          	"action": function(){
          		var theFinalString = "";
          		for(var i =0; i< theListGrid.data.length; i++){
          			var currentData = theListGrid.data[i].selectTwoField;
          			theFinalString += currentData+", "; 
          			console.log(currentData);
          		}
          		isc.say("This is in: "+theFinalString);
          	},
          	"title": 'values currently in select two',
          	width: 200,
          });
           isc.Button.create({
          	left:500,
          	top:300,
          	"action": function(){
          		var editedRows = theListGrid.getAllEditRows();
          		isc.say("There are "+editedRows.length+" edited rows");
          		for(var i=0; i< editedRows.length ; i++){
          			console.log(theListGrid.getRecord(editedRows[i]));
          		}
          	},
          	width: 200,
          	"title": 'how many editedRows are there?'
          });
          isc.Button.create({
          	left:500,
          	top:280,
          	"action": function(){
          		var editedRows = theListGrid.saveAllEdits();
          		console.log(editedRows);
          	},
          	width: 200,
          	"title": 'call saveAllEdits'
          });
          Note to this: we have tested it with the latest nightly build and latest versions of chrome/firefox/IE11 with the same results.

          thanks in advance
          Last edited by SimonF; 21 Nov 2014, 01:53. Reason: added some more clearity - tried

          Comment


            #6
            Ok we'll take a look and see if we can either steer you in the right direction or improve framework behavior if that's more appropriate.
            Expect a follow up soon

            Regards
            Isomorphic Software

            Comment


              #7
              Looking at your use case, it seems like there may be a usage issue here. It seems likely that you want to use 'setEditValue()' rather than updating the underlying record.

              You're reacting to the "changed" event on the listGrid field - this gets fired when the user interacts with the edit form item. At this stage the user has not saved that edit out, so it won't impact the underlying data until the user hits enter, or application code calls saveEdits() for the row.
              So this seems like an odd time for you to update your underlying record value. The user after all could still cancel their edit by simply hitting the Escape key.

              If your replace your changedSelectOneField with something like this:
              Code:
              function changedSelectOneField(p3){
                      var editRow = theListGrid.getEditRow();
                      theListGrid.setEditValue(editRow, "checkBox1Field", true);
                      theListGrid.setEditValue(editRow, "checkBox2Field", false);
                      theListGrid.setEditValue(editRow, "selectOneField", p3);
                      theListGrid.setEditValue(editRow, "backSelect1Field", 2);
                      theListGrid.setEditValue(editRow, "costObjectiveListGridField", "Keine");
              //... etc
              }
              Then when the user changes the one field, you automatically update all the other fields in the edit values, and when the user actually saves out their change with an enter keypress, the change will be incorporated into your data, as you'd expect (or if the user rejects the change with an escape keypress, all these changes would be dropped).


              Having said that, we do also recognize that behavior when the underlying record is modified for an edit row isn't ideal. A real world use case where this might arise would probably be data being updated by some unrelated application logic (something like a grid which receives realtime updates from the server as in this example).
              We certainly shouldn't be clobbering the new record value with the old record value when you attempt to save out the edit row for fields where an editor isn't visible. This is the issue you describe here:
              - changing the data of the listgrid and calling dataChanged does change the display of the not editable textfield correctly. But i assume there is also an editor, whose value is not correctly set and therefore results in a change after the edit.
              and we plan to address this.

              The question of whether changes to an underlying record should be folded into the live editors of an edit row is more ambiguous and we're considering this internally.


              Going back to your usage: if you really need to update the underlying data object for the current edit row in response to the user changing the value of an editor, you can still get the behavior you are after by simply calling setEditValue for each field *as well as* updating the underlying record. Or, after calling setEditValue() for each field, you could explicitly call saveEdits() and allow the normal grid values handling to update the underlying record for you (without dismissing the editor). This actually may be a better solution as it avoids you duplicating work.
              FYI if you do set the values in both places we already have logic within the form to compare the live edit values with the underlying record values, so if you've explicitly set both to the same value, this is likely to not be reported as a change and you shouldn't see erroneous saves occurring, etc.

              Regards
              Isomorphic Software
              Last edited by Isomorphic; 21 Nov 2014, 12:38. Reason: Added suggestion to call 'saveEdits' rather than updating record directly

              Comment


                #8
                Thanks for the fast response.

                If i understand you right, i have to change the underlaying listgrid data (like before with calling dataChanged()) and after that i have to call setEditValue() for each field in the listgrid. After that the cells are marked blue, so i have to call saveEdits on the listgrid.

                Or

                Dont change the underlaying data and only call setEditValue() with an saveEdits() afterwards.


                I have tried both solution you suggested. In Example One i have changed the underlaying data and afterwards set the changes for each field. If i don't call saveEdits the changes made by the user are marked as blue and stay there. Using saveEdits handle this problem and marks the text black again. The problem here is that the changes are not visible while editing

                Code:
                function changedSelectOneField(p3){
                	theRealEditedRow = theListGrid.getEditRow();
                	var i = theRealEditedRow;
                	var theEditedRowIndex = i;
                	var index = theEditedRowIndex
                	var record = theListGrid.data[theEditedRowIndex];
                	console.log(index);
                	var updatedData = {};
                	if(theRealEditedRow == i){
                		record.checkBox1Field = true;
                		record.checkBox2Field = false;
                		record.selectOneField = p3;
                		record.backSelect1Field=2;
                		record.dayDateColumn="NOW ITS CHANGED";
                		record.backSelect2Field=3;
                		record.priceField= "-4,80 €";
                		record.backSelect3Field=3;
                		record.selectTwoField = p3;
                		var sum = (record.backSelect1Field + record.backSelect2Field + record.backSelect3Field);
                		record.priceField = sum+",00 €";
                		record.sumField = (parseInt(p3)+parseInt(p3)+ sum)+",00 €";		
                		theListGrid.data.dataChanged();
                		
                		theListGrid.setEditValue(index, "backSelect1Field",record.backSelect1Field);
                		theListGrid.setEditValue(index, "priceField" , record.priceField);
                		theListGrid.setEditValue(index, "dayDateColumn" , record.dayDateColumn);
                		theListGrid.setEditValue(index, "checkBox1Field" , record.checkBox1Field);
                		theListGrid.setEditValue(index, "selectOneField" , record.selectOneField);
                		theListGrid.setEditValue(index, "selectTwoField" , record.selectTwoField);
                		theListGrid.setEditValue(index, "checkBox2Field" , record.checkBox2Field);
                		theListGrid.setEditValue(index, "backSelect2Field" , record.backSelect2Field);
                		theListGrid.setEditValue(index, "sumField" , record.sumField);
                		theListGrid.setEditValue(index, "backSelect3Field" , record.backSelect3Field);
                		// toggle this for example usage 
                		// theListGrid.saveEdits();
                	}
                }
                function changedSelectTwoField(p3){
                }
                function change1(){
                }
                function change2(){
                }
                function change3(){
                }
                isc.ListGrid.create(
                          {
                			autodraw: true,
                           "ID":"theListGrid",
                           "width":"100%",
                           "height":"100%",
                           "hideUsingDisplayNone":false,
                           "leaveScrollbarGap":true,
                           "selectionType":"single",
                           "canEdit":true,
                           "canEditCell":function (rowNumber, columNumber) {
                				if (rowNumber == 0 && (columNumber == 2 ||  columNumber == 8))
                					return false;
                				return this.Super('canEditCell', arguments);
                		   },
                           "editEvent":"click",
                           "autoSaveEdits":false,
                           "alternateRecordStyles":true,
                           "modalEditing":true,
                           "timeFormatter":"toShort24HourTime",
                           "sortField":"nil",
                           "sortDirection":"ascending",
                           "fixedRecordHeights":false,
                           "neverValidate":true,
                           "selectionProperty":"isSelected",
                           "showRecordComponents":true,
                           "showRecordComponentsByCell":true,
                           "canGroupBy":false,
                           "canPickFields":false,
                           "clwGeneratedIndexName":"daysListGridGeneratedIndex",
                           "fields":
                           [
                            {
                             "name":"dayDateColumn",
                             "title":"Date",
                             "type":"text",
                             "align":"right",
                             "width":200,
                             "canEdit":false
                            },
                            {
                             "name":"selectOneField",
                             "title":"Select one",
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "showValueIconOnly":false,
                             "suppressValueIcon":true,             
                             "editorProperties":
                             {
                              "ID":"selectOneField_Editor",
                              "changed":function (p1, p2, p3) {changedSelectOneField(p3)},
                              "suppressValueIcon":true,
                              "prompt":"",
                              "textMatchStyle":"substring"
                             },
                             "valueMap":
                             {
                              1:"Burger",
                              2:"Pommes",
                              3:"Pizza",
                              4:"Cola",
                              5:"Beer",
                              6:"Water",
                              7:"Ham",
                              8:"Chicken",
                              9:"Beacon",
                              10:"Peach",
                              11:"Banana"              
                             }
                            },
                            {
                             "name":"selectTwoField",
                             "title":"Select two",
                             "formatCellValue":function (value, record, rowNum, colNum ) {
                				if( rowNum == 0 ){return null}else{return value;}},
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "emptyCellValue":"n\/a",
                             "showValueIconOnly":false,
                             "suppressValueIcon":true,             
                             "editorProperties":
                             {
                              "ID":"selectTwoField_Editor",
                              "changed":function (p1, p2, p3) {changedSelectTwoField(p3)},
                              "suppressValueIcon":true,
                              "textMatchStyle":"substring"
                             },
                             "valueMap":
                             {
                              1:"Burger",
                              2:"Pommes",
                              3:"Pizza",
                              4:"Cola",
                              5:"Beer",
                              6:"Water",
                              7:"Ham",
                              8:"Chicken",
                              9:"Beacon",
                              10:"Peach",
                              11:"Banana",
                              12:"n\/a"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"backSelect1Field",
                             "title":"BackSelect 1",
                             "width":80,
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "editorProperties":
                             {
                              "changed":function (p1, p2, p3) {change1()},
                              "prompt":"",
                              "textMatchStyle":"substring",
                              "ID":"backSelect1Field_Editor"
                             },
                             "valueMap":
                             {
                              1:"Yes",
                              2:"Maybe",
                              3:"No"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"backSelect2Field",
                             "title":"BackSelect 2",
                             "width":78,
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "editorProperties":
                             {
                              "changed":function (p1, p2, p3) {change2()}              
                             },
                             "valueMap":
                             {
                              1:"Yes",
                              2:"Maybe",
                              3:"No"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"backSelect3Field",
                             "title":"BackSelect 3",
                             "width":78,
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "editorProperties":
                             {
                              "changed":function (p1, p2, p3) {change3()},
                              "textMatchStyle":"substring",
                              "ID":"backSelect3Field_Editor"
                             },
                             "valueMap":
                             {
                              1:"Yes",
                              2:"Maybe",
                              3:"No"
                             }
                            },
                            {
                             "name":"priceField",
                             "title":"Price",
                             "type":"text",
                             "align":"right",
                             "width":55,
                             "canEdit":false,
                             "canSort":false
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"checkBox1Field",
                             "title":"Tag",
                             "type":"boolean",
                             "width":45,
                             "canEdit":true,
                             "canSort":false,
                             "canToggle":false,
                             "editorProperties":
                             {
                              "ID":"checkBox1Field_Editor"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"checkBox2Field",
                             "title":"Nacht",
                             "type":"boolean",
                             "width":45,
                             "canEdit":true,
                             "canSort":false,
                             "canToggle":false,
                             "editorProperties":
                             {
                              "ID":"checkBox2Field_Editor"
                             }
                            },
                            {
                             "name":"sumField",
                             "title":"Sum Prize",
                             "type":"text",
                             "align":"right",
                             "width":62,
                             "canEdit":false,
                             "canSort":false
                            }
                           ],
                           "members":
                           [],
                           "data":
                           [
                            {
                             "checkBox1Field":true,
                             "checkBox2Field":false,
                             "selectOneField":2,
                             "sumField":"12,00 €",
                             "backSelect1Field":1,
                             "dayDateColumn":"Mi, 22.10.2014",
                             "backSelect2Field":3,
                             "priceField":"-4,80 €",
                             "backSelect3Field":3,
                             "selectTwoField":12
                            },
                            {
                             "checkBox1Field":true,
                             "checkBox2Field":true,
                             "selectOneField":6,
                             "sumField":"122,00 €",
                             "backSelect1Field":1,
                             "dayDateColumn":"CHANGE THIS and PRESS ENTER --->",
                             "backSelect2Field":1,
                             "priceField":"-41,00 €",
                             "backSelect3Field":1,
                             "selectTwoField":6
                            }
                           ]
                          }
                          )
                 isc.Button.create({
                	left:500,
                	top:320,
                	"action": function(){
                		var theFinalString = "";
                		for(var i =0; i< theListGrid.data.length; i++){
                			var currentData = theListGrid.data[i].selectTwoField;
                			theFinalString += currentData+", "; 
                			console.log(currentData);
                		}
                		isc.say("This is in: "+theFinalString);
                	},
                	"title": 'values currently in select two',
                	width: 200,
                });
                 isc.Button.create({
                	left:500,
                	top:300,
                	"action": function(){
                		var editedRows = theListGrid.getAllEditRows();
                		isc.say("There are "+editedRows.length+" edited rows");
                		for(var i=0; i< editedRows.length ; i++){
                			console.log(theListGrid.getRecord(editedRows[i]));
                		}
                	},
                	width: 200,
                	"title": 'how many editedRows are there?'
                });
                isc.Button.create({
                	left:500,
                	top:280,
                	"action": function(){
                		var editedRows = theListGrid.saveAllEdits();
                		console.log(editedRows);
                	},
                	width: 200,
                	"title": 'call saveAllEdits'
                });

                In the second example i have tried the second solution you recommended. Here i don't change the underlaying data but calling setEditValue for each field and call saveEdits afterwards. This does change the current edited row, but expanding this on mulitple rows does not correctly save in a way, so there additional edited rows, which souldn't be marked as edited at this time.
                One other issue which i have detected is, that the error which is set before saveEdits is called is removed afterwards. (You can see this behaviour also in the gif below)
                Code:
                function changedSelectOneField(p3){
                	theRealEditedRow = theListGrid.getEditRow();
                	var i = theRealEditedRow;
                	var theEditedRowIndex = i;
                	var index = theEditedRowIndex
                	var record = theListGrid.data[theEditedRowIndex];
                	console.log(index);
                	var updatedData = {};
                	if(theRealEditedRow == i){
                		var sum = 4;		
                		theListGrid.setFieldError(index, 'selectTwoField', 'this error is showed once');
                		theListGrid.setEditValue(index, "backSelect1Field",(parseInt(p3) % 3)+1);
                		theListGrid.setEditValue(index, "priceField" , sum+",00 €");
                		theListGrid.setEditValue(index, "dayDateColumn" , "NOW ITS CHANGED");
                		theListGrid.setEditValue(index, "checkBox1Field" , true);
                		theListGrid.setEditValue(index, "selectOneField" , p3);
                		theListGrid.setEditValue(index, "selectTwoField" , p3);
                		theListGrid.setEditValue(index, "checkBox2Field" , false);
                		theListGrid.setEditValue(index, "backSelect2Field" , (parseInt(p3) % 3)+1);
                		theListGrid.setEditValue(index, "sumField" , (parseInt(p3)+parseInt(p3)+ sum)+",00 €");
                		theListGrid.setEditValue(index, "backSelect3Field" , (parseInt(p3) % 3)+1);
                		theListGrid.saveEdits();
                		// here no field error is visible
                		// moving the "setFieldError" in this place the error stays visible
                	}
                }
                Like i annotated before, we have also cases where we have to update multiple rows according to one change in the Listgrid field. Maybe this results in the following behaviour, that the changes made by the user is not committed to the listgrid.

                If you change the value of the BackSelect2 from bottom to top and switch the value for each row you can see in the code, there is always the saveEdits() call after each change. But the last 2 rows get neither the setErrorText set nor the values are changed.


                I could reproduce this with this example:
                Code:
                function changedSelectOneField(p3){
                	theRealEditedRow = theListGrid.getEditRow();
                	var i = theRealEditedRow;
                	var theEditedRowIndex = i;
                	var index = theEditedRowIndex
                	var record = theListGrid.data[theEditedRowIndex];
                	console.log(index);
                	var updatedData = {};
                	if(theRealEditedRow == i){
                		var sum = 4;		
                		theListGrid.setFieldError(index, 'selectTwoField', 'this error is showed once');
                		theListGrid.setEditValue(index, "backSelect1Field",(parseInt(p3) % 3)+1);
                		theListGrid.setEditValue(index, "priceField" , sum+",00 €");
                		theListGrid.setEditValue(index, "dayDateColumn" , "NOW ITS CHANGED");
                		theListGrid.setEditValue(index, "checkBox1Field" , true);
                		theListGrid.setEditValue(index, "selectOneField" , p3);
                		theListGrid.setEditValue(index, "selectTwoField" , p3);
                		theListGrid.setEditValue(index, "checkBox2Field" , false);
                		theListGrid.setEditValue(index, "backSelect2Field" , (parseInt(p3) % 3)+1);
                		theListGrid.setEditValue(index, "sumField" , (parseInt(p3)+parseInt(p3)+ sum)+",00 €");
                		theListGrid.setEditValue(index, "backSelect3Field" , (parseInt(p3) % 3)+1);
                		theListGrid.saveEdits();
                	}
                }
                function changedSelectTwoField(p3){
                }
                function change1(p3){
                }
                function change2(p3){
                	theRealEditedRow = theListGrid.getEditRow();	
                	console.log(index);
                	var updatedData = {};
                	for(var i = 0;i < theListGrid.data.length;i++){
                		var theEditedRowIndex = i;
                		var index = theEditedRowIndex
                		var record = theListGrid.data[theEditedRowIndex];
                		if(theRealEditedRow == i){
                			var sum = 4;		
                			theListGrid.setFieldError(index, 'selectTwoField', 'this error is showed once');
                			theListGrid.setEditValue(index, "backSelect1Field",(parseInt(p3) % 3)+1);
                			theListGrid.setEditValue(index, "priceField" , sum+",00 €");
                			theListGrid.setEditValue(index, "dayDateColumn" , "NOW ITS CHANGED");
                			theListGrid.setEditValue(index, "checkBox1Field" , true);
                			theListGrid.setEditValue(index, "selectOneField" , record.selectOneField);
                			theListGrid.setEditValue(index, "selectTwoField" , record.selectTwoField);
                			theListGrid.setEditValue(index, "checkBox2Field" , false);
                			theListGrid.setEditValue(index, "backSelect2Field" , p3);
                			theListGrid.setEditValue(index, "sumField" , (parseInt(p3)+parseInt(p3)+ sum)+",00 €");
                			theListGrid.setEditValue(index, "backSelect3Field" , (parseInt(p3) % 3)+1);
                			theListGrid.saveEdits();
                		}else{
                			theListGrid.setEditValue(index, "backSelect1Field",record.backSelect1Field);
                			theListGrid.setEditValue(index, "priceField" , record.priceField);
                			theListGrid.setEditValue(index, "dayDateColumn" , record.dayDateColumn);
                			theListGrid.setEditValue(index, "checkBox1Field" , record.checkBox1Field);
                			theListGrid.setEditValue(index, "selectOneField" , record.selectOneField);
                			theListGrid.setEditValue(index, "selectTwoField" , record.selectTwoField);
                			theListGrid.setEditValue(index, "checkBox2Field" , record.checkBox2Field);
                			theListGrid.setEditValue(index, "backSelect2Field" , record.backSelect2Field);
                			theListGrid.setEditValue(index, "sumField" , record.sumField);
                			theListGrid.setEditValue(index, "backSelect3Field" , record.backSelect3Field);
                			theListGrid.saveEdits();
                		}
                	}
                }
                function change3(p3){
                }
                isc.ListGrid.create(
                          {
                			autodraw: true,
                           "ID":"theListGrid",
                           "width":"100%",
                           "height":"100%",
                           "hideUsingDisplayNone":false,
                           "leaveScrollbarGap":true,
                           "selectionType":"single",
                           "canEdit":true,
                           "canEditCell":function (rowNumber, columNumber) {
                				if (rowNumber == 0 && (columNumber == 2 ||  columNumber == 8))
                					return false;
                				return this.Super('canEditCell', arguments);
                		   },
                           "editEvent":"click",
                           "autoSaveEdits":false,
                           "alternateRecordStyles":true,
                           "modalEditing":true,
                           "timeFormatter":"toShort24HourTime",
                           "sortField":"nil",
                           "sortDirection":"ascending",
                           "fixedRecordHeights":false,
                           "neverValidate":true,
                           "selectionProperty":"isSelected",
                           "showRecordComponents":true,
                           "showRecordComponentsByCell":true,
                           "canGroupBy":false,
                           "canPickFields":false,
                           "clwGeneratedIndexName":"daysListGridGeneratedIndex",
                           "fields":
                           [
                            {
                             "name":"dayDateColumn",
                             "title":"Date",
                             "type":"text",
                             "align":"right",
                             "width":200,
                             "canEdit":false
                            },
                            {
                             "name":"selectOneField",
                             "title":"Select one",
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "showValueIconOnly":false,
                             "suppressValueIcon":true,             
                             "editorProperties":
                             {
                              "ID":"selectOneField_Editor",
                              "changed":function (p1, p2, p3) {changedSelectOneField(p3)},
                              "suppressValueIcon":true,
                              "prompt":"",
                              "textMatchStyle":"substring"
                             },
                             "valueMap":
                             {
                              1:"Burger",
                              2:"Pommes",
                              3:"Pizza",
                              4:"Cola",
                              5:"Beer",
                              6:"Water",
                              7:"Ham",
                              8:"Chicken",
                              9:"Beacon",
                              10:"Peach",
                              11:"Banana"              
                             }
                            },
                            {
                             "name":"selectTwoField",
                             "title":"Select two",
                             "formatCellValue":function (value, record, rowNum, colNum ) {
                				if( rowNum == 0 ){return null}else{return value;}},
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "emptyCellValue":"n\/a",
                             "showValueIconOnly":false,
                             "suppressValueIcon":true,             
                             "editorProperties":
                             {
                              "ID":"selectTwoField_Editor",
                              "changed":function (p1, p2, p3) {changedSelectTwoField(p3)},
                              "suppressValueIcon":true,
                              "textMatchStyle":"substring"
                             },
                             "valueMap":
                             {
                              1:"Burger",
                              2:"Pommes",
                              3:"Pizza",
                              4:"Cola",
                              5:"Beer",
                              6:"Water",
                              7:"Ham",
                              8:"Chicken",
                              9:"Beacon",
                              10:"Peach",
                              11:"Banana",
                              12:"n\/a"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"backSelect1Field",
                             "title":"BackSelect 1",
                             "width":80,
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "editorProperties":
                             {
                              "changed":function (p1, p2, p3) {change1(p3)},
                              "prompt":"",
                              "textMatchStyle":"substring",
                              "ID":"backSelect1Field_Editor"
                             },
                             "valueMap":
                             {
                              1:"Yes",
                              2:"Maybe",
                              3:"No"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"backSelect2Field",
                             "title":"BackSelect 2",
                             "width":78,
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "editorProperties":
                             {
                              "changed":function (p1, p2, p3) {change2(p3)}              
                             },
                             "valueMap":
                             {
                              1:"Yes",
                              2:"Maybe",
                              3:"No"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"backSelect3Field",
                             "title":"BackSelect 3",
                             "width":78,
                             "canEdit":true,
                             "canSort":false,
                             "editorType":"SelectItem",
                             "editorProperties":
                             {
                              "changed":function (p1, p2, p3) {change3(p3)},
                              "textMatchStyle":"substring",
                              "ID":"backSelect3Field_Editor"
                             },
                             "valueMap":
                             {
                              1:"Yes",
                              2:"Maybe",
                              3:"No"
                             }
                            },
                            {
                             "name":"priceField",
                             "title":"Price",
                             "type":"text",
                             "align":"right",
                             "width":55,
                             "canEdit":false,
                             "canSort":false
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"checkBox1Field",
                             "title":"Tag",
                             "type":"boolean",
                             "width":45,
                             "canEdit":true,
                             "canSort":false,
                             "canToggle":false,
                             "editorProperties":
                             {
                              "ID":"checkBox1Field_Editor"
                             }
                            },
                            {
                             "changed":function (p1, p2, p3) {},
                             "name":"checkBox2Field",
                             "title":"Nacht",
                             "type":"boolean",
                             "width":45,
                             "canEdit":true,
                             "canSort":false,
                             "canToggle":false,
                             "editorProperties":
                             {
                              "ID":"checkBox2Field_Editor"
                             }
                            },
                            {
                             "name":"sumField",
                             "title":"Sum Prize",
                             "type":"text",
                             "align":"right",
                             "width":62,
                             "canEdit":false,
                             "canSort":false
                            }
                           ],
                           "members":
                           [],
                           "data":
                           [
                            {
                             "checkBox1Field":true,
                             "checkBox2Field":false,
                             "selectOneField":2,
                             "sumField":"12,00 €",
                             "backSelect1Field":1,
                             "dayDateColumn":"Th, 22.10.2014",
                             "backSelect2Field":3,
                             "priceField":"-4,80 €",
                             "backSelect3Field":3,
                             "selectTwoField":12
                            },
                            {
                             "checkBox1Field":true,
                             "checkBox2Field":true,
                             "selectOneField":6,
                             "sumField":"122,00 €",
                             "backSelect1Field":1,
                             "dayDateColumn":"CHANGE THIS and PRESS ENTER --->",
                             "backSelect2Field":1,
                             "priceField":"-41,00 €",
                             "backSelect3Field":1,
                             "selectTwoField":6
                            },
                            {
                             "checkBox1Field":true,
                             "checkBox2Field":true,
                             "selectOneField":6,
                             "sumField":"122,00 €",
                             "backSelect1Field":1,
                             "dayDateColumn":"Fr, 24.10.2014",
                             "backSelect2Field":1,
                             "priceField":"-41,00 €",
                             "backSelect3Field":1,
                             "selectTwoField":6
                            }
                           ]
                          }
                          )
                 isc.Button.create({
                	left:500,
                	top:320,
                	"action": function(){
                		var theFinalString = "";
                		for(var i =0; i< theListGrid.data.length; i++){
                			var currentData = theListGrid.data[i].selectTwoField;
                			theFinalString += currentData+", "; 
                			console.log(currentData);
                		}
                		isc.say("This is in: "+theFinalString);
                	},
                	"title": 'values currently in select two',
                	width: 200,
                });
                 isc.Button.create({
                	left:500,
                	top:300,
                	"action": function(){
                		var editedRows = theListGrid.getAllEditRows();
                		isc.say("There are "+editedRows.length+" edited rows");
                		for(var i=0; i< editedRows.length ; i++){
                			console.log(theListGrid.getRecord(editedRows[i]));
                		}
                	},
                	width: 200,
                	"title": 'how many editedRows are there?'
                });
                isc.Button.create({
                	left:500,
                	top:280,
                	"action": function(){
                		var editedRows = theListGrid.saveAllEdits();
                		console.log(editedRows);
                	},
                	width: 200,
                	"title": 'call saveAllEdits'
                });

                I see there are some issues, using both of the solution you suggested.

                Summarized:
                - Solution one: to update the underlaying data, call dataChanged() and update listgrid with "setEditValue" on each field and afterwards call "saveEdits()" doesnt get the job done, because the data is not changed while editing.
                - solution two: only call "setEditValue" on each field and calling saveEdits() after each change, also doesn't get the job done, because changes are not taken into the lsitgrid correctly

                I think the setFieldError issue, is one of the minor bugs (which also should be dealt with), but cannot update the data while editing is one major issue for us. Changing items and saving them and afterwards have unsaved changes in the listgrid has multiple sideeffects for our applications.
                Hopefully we can find a solution for this.
                Last edited by SimonF; 24 Nov 2014, 02:39.

                Comment


                  #9
                  What i previously was not aware of is, that there are js-errors in the console, with somehow both examples. (in the latest nightly SmartClient_v100p_2014-11-23_Pro)

                  this is in the first example:

                  this is for the second example.

                  Comment


                    #10
                    Are there any news about this?
                    This is a major blocker for us and since the upgrade from Smartclient 9.1 to Smartclient 10.0 there is no correct way to upgrade listgrids-rows for us.

                    Comment


                      #11
                      It's assigned for investigation. You should get a follow up later today.

                      Comment


                        #12
                        This thread is a little confusing, but hopefully we can help out.

                        Firstly: We have gone ahead and made a change whereby if a developer modifies the listGrid data underneath a live edit row (which the user is actively editing), the values displayed in the editors for that row will now update to reflect the record values automatically, unless:
                        a) There are edit values already in place for some field (from a user edit, or from a call to 'setEditValue()') which differ from the new record value.
                        b) The actual focused edit item will never be updated in this way as this would be a confusing user experience.

                        We also found and fixed the JavaScript error you were seeing.

                        This means that if you pick up the next nightly build, dated Nov 26 or above, you should be able to go back to the approach of modifying the data directly and calling 'dataChanged', and the new values will be displayed to the user without the need to call 'setEditValue()' etc.

                        It seems likely this will allow you to get things up and running with your original approach (modify the data, call dataChanged).


                        Having said that - this approach of reacting to a user edit within a grid by updating the underlying data both in the current edit row and potentially in other rows seems a little odd.
                        When a user starts editing a row in a grid, and then changes a field value, the value is not typically immediately saved to the data. (The user still has the option to cancel the edit by hitting escape, for example, or a validation failure may reject the change).
                        Instead the pending edits are held onto as "edit values" for the row until either the user takes an action to save or a programmatic call to saveValues() is invoked.
                        There are various properties to control when this takes place (see autoSaveEdits, saveByCell, etc).
                        Once this does occur, the row is validated, and assuming validation succeeds, the edits are rolled into the underlying data object (either by updating the data array, or if the grid is databound, by committing a request to the DataSource).

                        What you appear to be doing here is directly modifying the underlying data (for other fields/records) in response to the user changing the edit value. That seems like it could leave you in unexpected states.
                        For example - a user could select a new value for a field (causing application code to perform various manipulations on the data object), and then could hit cancel, meaning the field reverts to its old value, but the manipulations performed by the app code in response to the changed event remain.

                        Of course you may have a use case we haven't considered, where this is correct and necessary, but it seems unusual enough that this is worth mentioning.


                        Anyway - please try the next nightly build (Nov 26) and see if you can get the behavior you are after. If not, let us know, and please be sure to lay out your exact use case as clearly as you can. We may be better able to help you achieve your ultimate goal within the app if we understand where you are trying to go, rather than troubleshooting these slightly obscure edge cases piecemeal.

                        Thanks
                        Isomorphic Software

                        Comment


                          #13
                          Yes it is confusing. I think it's one of the basic behaviours of smartclient and there are many dependencies to this. But thanks for still trying to get this done.

                          With the latest nightly SmartClient_v100p_2014-11-26_Pro the errors are now gone. Now like you described the update works on different rows and on the current-edited row.
                          This is the way we tried at first to accomplish, but now with dataChanged-call.

                          I know, that this usage might seem odd. I think there are two different use cases here.
                          The first isthe "normal" update of a record/row, which is not currently edited. This might happen if the user has selected an row and clicks a button on a toolstrip to directly modify an field of the row. Like a Button "set this row to this value". I think this is the easier case, because the button triggers an action to the backend, and the backend creates an answer to update the row in the listgrid. Therefore the underlaying data has to be changed and the changes made by the user results in no "editRows" in the listgrid.

                          The second use case is different to this. While editing a row, some of the values are dependent from each other. Like in the gif below, there are some "sum"-Fields which will be calculated dependent on the select-boxes and the checkboxes. If the user changes the value of a selectbox or checkbox, the data is directly send to the server, where these sums are calculated. Because of this (heavy) calculation, we have to store the changes of the user in the model, so we can calculate these sums. And this also directly affects the listgrid. Because we have to save the changes of the user into the model to caluclate the sum(s). We have to update the field in the record, which the user currently edits. I hope this contributed a bit to the clarity of the use case.

                          Nonetheless, the fix is working for the first change. After changing the same selectbox again, the fields does'nt change a second time and the values, which are changed a second time, are marked in blue with the values of the first changed value.

                          This does not happen if you exit the editor (with a hit on enter) after the first change. And then open the selectbox again and change the value.

                          the code for reproducing stays the same, but for clarity i append it again
                          Code:
                          function changedSelectOneField(p3){
                          	theRealEditedRow = theListGrid.getEditRow();
                          	var i = theRealEditedRow;
                          	var theEditedRowIndex = i;
                          	var index = theEditedRowIndex
                          	var record = theListGrid.data[theEditedRowIndex];
                          	console.log(index);
                          	var updatedData = {};
                          	if(theRealEditedRow == i){
                          		record.checkBox1Field = true;
                          		record.checkBox2Field = false;
                          		record.selectOneField = p3;
                          		record.backSelect1Field=2;
                          		record.dayDateColumn="NOW ITS CHANGED";
                          		record.backSelect2Field=3;
                          		record.priceField= "-4,80 €";
                          		record.backSelect3Field=3;
                          		record.selectTwoField = p3;
                          		var sum = (record.backSelect1Field + record.backSelect2Field + record.backSelect3Field);
                          		record.priceField = sum+",00 €";
                          		record.sumField = (parseInt(p3)+parseInt(p3)+ sum)+",00 €";		
                          		theListGrid.data.dataChanged();
                          	}
                          }
                          function changedSelectTwoField(p3){
                          }
                          function change1(){
                          }
                          function change2(){
                          }
                          function change3(){
                          }
                          isc.ListGrid.create(
                                    {
                          			autodraw: true,
                                     "ID":"theListGrid",
                                     "width":"100%",
                                     "height":"100%",
                                     "hideUsingDisplayNone":false,
                                     "leaveScrollbarGap":true,
                                     "selectionType":"single",
                                     "canEdit":true,
                                     "canEditCell":function (rowNumber, columNumber) {
                          				if (rowNumber == 0 && (columNumber == 2 ||  columNumber == 8))
                          					return false;
                          				return this.Super('canEditCell', arguments);
                          		   },
                                     "editEvent":"click",
                                     "autoSaveEdits":false,
                                     "alternateRecordStyles":true,
                                     "modalEditing":true,
                                     "timeFormatter":"toShort24HourTime",
                                     "sortField":"nil",
                                     "sortDirection":"ascending",
                                     "fixedRecordHeights":false,
                                     "neverValidate":true,
                                     "selectionProperty":"isSelected",
                                     "showRecordComponents":true,
                                     "showRecordComponentsByCell":true,
                                     "canGroupBy":false,
                                     "canPickFields":false,
                                     "clwGeneratedIndexName":"daysListGridGeneratedIndex",
                                     "fields":
                                     [
                                      {
                                       "name":"dayDateColumn",
                                       "title":"Date",
                                       "type":"text",
                                       "align":"right",
                                       "width":200,
                                       "canEdit":false
                                      },
                                      {
                                       "name":"selectOneField",
                                       "title":"Select one",
                                       "canEdit":true,
                                       "canSort":false,
                                       "editorType":"SelectItem",
                                       "showValueIconOnly":false,
                                       "suppressValueIcon":true,             
                                       "editorProperties":
                                       {
                                        "ID":"selectOneField_Editor",
                                        "changed":function (p1, p2, p3) {changedSelectOneField(p3)},
                                        "suppressValueIcon":true,
                                        "prompt":"",
                                        "textMatchStyle":"substring"
                                       },
                                       "valueMap":
                                       {
                                        1:"Burger",
                                        2:"Pommes",
                                        3:"Pizza",
                                        4:"Cola",
                                        5:"Beer",
                                        6:"Water",
                                        7:"Ham",
                                        8:"Chicken",
                                        9:"Beacon",
                                        10:"Peach",
                                        11:"Banana"              
                                       }
                                      },
                                      {
                                       "name":"selectTwoField",
                                       "title":"Select two",
                                       "formatCellValue":function (value, record, rowNum, colNum ) {
                          				if( rowNum == 0 ){return null}else{return value;}},
                                       "canEdit":true,
                                       "canSort":false,
                                       "editorType":"SelectItem",
                                       "emptyCellValue":"n\/a",
                                       "showValueIconOnly":false,
                                       "suppressValueIcon":true,             
                                       "editorProperties":
                                       {
                                        "ID":"selectTwoField_Editor",
                                        "changed":function (p1, p2, p3) {changedSelectTwoField(p3)},
                                        "suppressValueIcon":true,
                                        "textMatchStyle":"substring"
                                       },
                                       "valueMap":
                                       {
                                        1:"Burger",
                                        2:"Pommes",
                                        3:"Pizza",
                                        4:"Cola",
                                        5:"Beer",
                                        6:"Water",
                                        7:"Ham",
                                        8:"Chicken",
                                        9:"Beacon",
                                        10:"Peach",
                                        11:"Banana",
                                        12:"n\/a"
                                       }
                                      },
                                      {
                                       "changed":function (p1, p2, p3) {},
                                       "name":"backSelect1Field",
                                       "title":"BackSelect 1",
                                       "width":80,
                                       "canEdit":true,
                                       "canSort":false,
                                       "editorType":"SelectItem",
                                       "editorProperties":
                                       {
                                        "changed":function (p1, p2, p3) {change1()},
                                        "prompt":"",
                                        "textMatchStyle":"substring",
                                        "ID":"backSelect1Field_Editor"
                                       },
                                       "valueMap":
                                       {
                                        1:"Yes",
                                        2:"Maybe",
                                        3:"No"
                                       }
                                      },
                                      {
                                       "changed":function (p1, p2, p3) {},
                                       "name":"backSelect2Field",
                                       "title":"BackSelect 2",
                                       "width":78,
                                       "canEdit":true,
                                       "canSort":false,
                                       "editorType":"SelectItem",
                                       "editorProperties":
                                       {
                                        "changed":function (p1, p2, p3) {change2()}              
                                       },
                                       "valueMap":
                                       {
                                        1:"Yes",
                                        2:"Maybe",
                                        3:"No"
                                       }
                                      },
                                      {
                                       "changed":function (p1, p2, p3) {},
                                       "name":"backSelect3Field",
                                       "title":"BackSelect 3",
                                       "width":78,
                                       "canEdit":true,
                                       "canSort":false,
                                       "editorType":"SelectItem",
                                       "editorProperties":
                                       {
                                        "changed":function (p1, p2, p3) {change3()},
                                        "textMatchStyle":"substring",
                                        "ID":"backSelect3Field_Editor"
                                       },
                                       "valueMap":
                                       {
                                        1:"Yes",
                                        2:"Maybe",
                                        3:"No"
                                       }
                                      },
                                      {
                                       "name":"priceField",
                                       "title":"Price",
                                       "type":"text",
                                       "align":"right",
                                       "width":55,
                                       "canEdit":false,
                                       "canSort":false
                                      },
                                      {
                                       "changed":function (p1, p2, p3) {},
                                       "name":"checkBox1Field",
                                       "title":"Tag",
                                       "type":"boolean",
                                       "width":45,
                                       "canEdit":true,
                                       "canSort":false,
                                       "canToggle":false,
                                       "editorProperties":
                                       {
                                        "ID":"checkBox1Field_Editor"
                                       }
                                      },
                                      {
                                       "changed":function (p1, p2, p3) {},
                                       "name":"checkBox2Field",
                                       "title":"Nacht",
                                       "type":"boolean",
                                       "width":45,
                                       "canEdit":true,
                                       "canSort":false,
                                       "canToggle":false,
                                       "editorProperties":
                                       {
                                        "ID":"checkBox2Field_Editor"
                                       }
                                      },
                                      {
                                       "name":"sumField",
                                       "title":"Sum Prize",
                                       "type":"text",
                                       "align":"right",
                                       "width":62,
                                       "canEdit":false,
                                       "canSort":false
                                      }
                                     ],
                                     "members":
                                     [],
                                     "data":
                                     [
                                      {
                                       "checkBox1Field":true,
                                       "checkBox2Field":false,
                                       "selectOneField":2,
                                       "sumField":"12,00 €",
                                       "backSelect1Field":1,
                                       "dayDateColumn":"Mi, 22.10.2014",
                                       "backSelect2Field":3,
                                       "priceField":"-4,80 €",
                                       "backSelect3Field":3,
                                       "selectTwoField":12
                                      },
                                      {
                                       "checkBox1Field":true,
                                       "checkBox2Field":true,
                                       "selectOneField":6,
                                       "sumField":"122,00 €",
                                       "backSelect1Field":1,
                                       "dayDateColumn":"CHANGE THIS and PRESS ENTER --->",
                                       "backSelect2Field":1,
                                       "priceField":"-41,00 €",
                                       "backSelect3Field":1,
                                       "selectTwoField":6
                                      }
                                     ]
                                    }
                                    );

                          Comment


                            #14
                            are there any news about this?

                            Comment


                              #15
                              Ok - we've made a change to address the issue where this only works the first time.
                              Please try the 10.0 build dated Dec 2 or above

                              Regards
                              Isomorphic Software

                              Comment

                              Working...
                              X