Hi Isomorphic,
We have a Editable ListGrid, with Dropdowns in 3 columns as shown in the picture.
When user is in particular row, then he can see the drop down display values properly and select them but after selecting the values from each dropdown in one row and on navigating to the next row, the display field in the first dropdown retains as it is, but in the other 2 dropdowns value field will be displayed instead of display field.
PFB the code for the same, and let us know what is going wrong here ?
We have a Editable ListGrid, with Dropdowns in 3 columns as shown in the picture.
When user is in particular row, then he can see the drop down display values properly and select them but after selecting the values from each dropdown in one row and on navigating to the next row, the display field in the first dropdown retains as it is, but in the other 2 dropdowns value field will be displayed instead of display field.
PFB the code for the same, and let us know what is going wrong here ?
Code:
isc.ListGrid.create({ height:127, width:"100%", alternateRecordStyles:true, autoDraw: true, canEdit:false, styleName:"attrGridBorder", baseStyle: "attrCritGridCell", leaveScrollbarGap: false, canSort:false, fields:[ {name:"attribute", title:"Attribute", editorType:"select", optionDataSource:"productAttributeDataSource", displayField:"attributeName", valueField:"attributeId", width:"20%" }, {name:"subAttribute", title:"Sub Attribute", editorType:"select", autoFetchData:false, optionDataSource:"productSubAttributeDataSource", displayField:"subAttributeName", valueField:"subAttributeId", width:"10%", editorProperties:{ getPickListFilterCriteria : function () { var attribute = this.grid.getEditedCell(this.rowNum, "attribute"); if(attribute != null){ return {"attr":attribute,"prevRecords":this.grid.data}; }else{ return {"attr":" ", "prevRecords":this.grid.data}; } } } }, {name:"value", title:"Value", editorType:"select", optionDataSource:"productSubAttributeValueDataSource", autoFetchData:false, displayField:"subAttributeValueName", valueField:"subAttributeValueId", width:"10%", editorProperties:{ getPickListFilterCriteria : function () { var subAttribute = this.grid.getEditedCell(this.rowNum, "subAttribute"); var Attribute = this.grid.getEditedCell(this.rowNum, "attribute"); if(Attribute != null && subAttribute != null){ return {"subAttr":subAttribute,"attr":Attribute}; }else{ return {"subAttr":" ","attr":" "}; } } } }, {name:"link", align:"center", type: "text", defaultValue:"Remove", canEdit:false, width:"10%", animateRemoveRecord:true } ], getCellCSSText:function(record, rowNum, colNum){ if (this.getFieldName(colNum) == "link") { return "text-decoration:underline;cursor:pointer"; } }, recordClick:function (viewer, record, recordNum, field, fieldNum, value, rawValue){ if(fieldNum == 3){ this.removeSelectedData(); } } })
Comment