SC 8.3 2013-07-25
Firefox/IE
I've tried to create a mockup of what we have currently in our product. Our listgrids do not do any validation on the browser side since the business logic is on the serverside. So what happens is when the user exists the edit mode, an update request gets sent, then comes back with the validation error. I assume this is set on the field by doing a setRowErrors() call on the listgrid when the validation error response comes back. So I have mimicked this in the validate button click.
So here's my scenario:
1. Load the sample below. Click on "add". This will add a new row at the bottom. Let's call this row #15
2. Click on validate. This will show my custom validation.
3. Now click on add button again. Again, this will add a new row at the bottom. Validation icon for row #15 is still there
4. Now click into the second column of row #15 then click somewhere else. The validation icon for row #15 is now gone.
What am I doing wrong here?
Firefox/IE
I've tried to create a mockup of what we have currently in our product. Our listgrids do not do any validation on the browser side since the business logic is on the serverside. So what happens is when the user exists the edit mode, an update request gets sent, then comes back with the validation error. I assume this is set on the field by doing a setRowErrors() call on the listgrid when the validation error response comes back. So I have mimicked this in the validate button click.
So here's my scenario:
1. Load the sample below. Click on "add". This will add a new row at the bottom. Let's call this row #15
2. Click on validate. This will show my custom validation.
3. Now click on add button again. Again, this will add a new row at the bottom. Validation icon for row #15 is still there
4. Now click into the second column of row #15 then click somewhere else. The validation icon for row #15 is now gone.
What am I doing wrong here?
Code:
Using countryDS from this example: isomorphic/system/reference/SmartClient_Explorer.html#dataValidation isc.ListGrid.create({ ID: "countryList", width:550, height:224, alternateRecordStyles:true, cellHeight:22, height:400, dataSource: countryDS,neverValidate: true, fields:[ {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false, validateOnChange:false}, {name:"countryName2",validateOnChange:false}, {name:"continent"}, {name:"member_g8"}, {name:"population", formatCellValue:"isc.Format.toUSString(value);", validators:[ {type:"integerRange", min:1} ] }, {name:"independence"} ], autoFetchData: true, canEdit: true, editEvent: "click" }) isc.Button.create({ ID:"testButton", title:"validate",top: 250,left:700, click:function(){ countryList.setRowErrors(15, { countryName2:{ errorMessage:"Name must be specified" } }) }}) isc.Button.create({ ID:"addButton", title: "add ", top: 250, left:800, click: function(){ countryList.startEditingNew(); } })
Comment