Smartclient Version : SmartClient_v90p_2014-03-07_PowerEdition
Browsers : IE9 and google chrome version 28
Issue :
TreeGrid loads fine for the first time when loadTree() function is called passing the treeRootValue and criteria.
TreeGrid is not reloading ( redrawing ) on change of treeRootValue and criteria calling loadTree() function.
TreeGrid shows the same data even after treeRootValue and criteria are changed.
Please find the code below.
Browsers : IE9 and google chrome version 28
Issue :
TreeGrid loads fine for the first time when loadTree() function is called passing the treeRootValue and criteria.
TreeGrid is not reloading ( redrawing ) on change of treeRootValue and criteria calling loadTree() function.
TreeGrid shows the same data even after treeRootValue and criteria are changed.
Please find the code below.
Code:
isc.TreeGrid.create({
ID: "childTreeGrid",
baseStyle:gridStyle,
showConnectors:true,
height:"100%",
width:"100%",
autoDraw: false,
showFilterEditor:false,
showSelectedStyle:true,
alternateRecordStyles:true,
cellHeight:22,
autoFitWidth: true,
dataSource: ds,
autoFetchData: false,
editEvent:"doubleClick",
modelType : "children",
isSelected : "true",
autoFetchTextMatchStyle:"exact",
autoOpenRoot : true,
showOpenIcons:true,
canEdit: false,
showResizeBar:false,
selectionType:"single",
fetchOperation: operationId,
dataPageSize: 30,
loadDataOnDemand: true,
fields : [...]
};
function loadTree(tree,productCriteria,refreshId,categoryId) {
var productCriteria = {
_constructor:"AdvancedCriteria",
operator:"and",
criteria:[
{fieldName:"COI_PRODUCT_TREE_ID", operator:"equals", value:treeCriteria.defaultTree },
{fieldName:"COI_PRODUCT_ID", operator:"notEqual", value:null},
{fieldName:"VIEW", operator:"notEqual", value:"ADVANCED"},
{fieldName:"PR0_BUY_DEPARTMENT", operator:"equals", value:deptId},
{fieldName:"PR0_ISACTIVE", operator:"equals", value:"Y"},
{fieldName:"PR0_IS_SERIAL_DEFINED", operator:"equals", value:"N"},
{fieldName:"PR0_IS_CONSUMABLE", operator:"equals", value:"Y"},
{ fieldName:"PR3_WAREHOUSE_NUMBER", operator:"equals", value:warehouseNumber}
]
};
var crit2 = {
_constructor:"AdvancedCriteria",
operator:"and",
criteria:[
{ fieldName: "COI_PRODUCT_ID", operator:"equals", value:null},
{ fieldName: "COI_PRODUCT_TREE_ID", operator:"equals", value: tree },
{ fieldName: "COI_PRODUCT_TREE_ID", operator:"greaterThan", value: refreshId }
]
]
};
var combinedCriteria = isc.DataSource.combineCriteria(productCriteria, crit2,"or");
childTreeGrid.setProperty("treeRootValue",categoryId);
childTreeGrid.fetchData(combinedCriteria);
}