obj.setProperty("selection/index", -1); not working for deselect
obj.setProperty("selection/index", -1); not working for deselecting the rows...
James
May 13,
var obj = new AW.UI.Grid;
obj.setCellText(function(i,j){return j + '-' + i});
obj.setHeaderText(function(i){return 'header-'+ + i});
obj.setColumnCount(4);
obj.setRowCount(15);
obj.setSelectionMode('single-row')
obj.setSelectedRows([0,2,4,6]);
obj.defineRowProperty("Mybackcolor", function(row){
return (obj.getRowPosition(row)%2)==1 ? "#EFEFEF" : "#fff";
});
obj.getRowTemplate().setStyle("background-color", function(){
return this.getRowProperty("Mybackcolor");
});
var button = new AW.UI.Button;
button.setControlText('UnSelect all Rows')
button.setId('a01');
button.onControlClicked = function(){
obj.setSelectedRows([]);
//obj.refresh();
}
document.write(button);
document.write(obj);
This topic is archived.
ActiveWidgets is a javascript library for creating user interfaces. It offers excellent performance for complex screens while staying simple, compact and easy to learn. Deployed by thousands of commercial customers in more than 70 countries worldwide.
Copyright © ActiveWidgets 2021