Damn - I hate that - just posed this and found a solution -
removed
- this.fTable.store.clearData();
and replaced with
- this.fTable.columns = [];
is this correct? - or is there a method to clear the columns?
MW wrote:
Hi, just a quick question - if i want to re-use a filteringtable widget with a different dataset [ potentially different columns and rows ] - how do i clear out the columns ?
I've tried filteringtable.store.clearData();
but this throws an error -> jojo.html.setClass() failed [TypeError: node has no properties, file:
http://auroradev.net/dojo/dojo.js, line: 4679]
code fragment below:-
populate: function(data){
var rows = data["rows"];
var columns = data["columns"];
this.fTable.store.clearData(); // if removed, then columns don't reset - left in produces error
this.fTable.valueField = data["key"];
for (var x = 0; x<columns.length; x++) {
this.fTable.columns.push(this.fTable.createMetaData(columns[x]));
}
this.fTable.store.setData(rows);
}
any help much appreciated.