Board Logo

Advanced Tigra Table PRO (extension)
netflexity - 5/5/2006 at 10:29 AM

Below is a script that will help many to programatically interact with Tigra Tables. I simply extended default behaviour of Tigra Table. Enjoy! BTW, if this is not legal please remove this post.

Thank you.
-Max


// AdvancedTable(), a Tigra Table wrapper
function AdvancedTTable (headers, contents, styles) {
// Inherit methods and properties from TTable()
this.table = new TTable(headers, contents, styles);

// Inherit all properties.
for (sProperty in this.table) {
this[sProperty] = this.table[sProperty];
}

// Function that will check or uncheck all rows.
// If this function gets ivoked after the search, only
// found rows will be selected.
this.exeSelect = function(checkFlag){
for (i in this.TTPa) {
if(this.TTPc){
for (j in this.TTPc) {
if(this.TTPc[j][this.TTPd] == this.TTPa[this.TTPd]){
this.TTPa[this.TTPd + 1] = (checkFlag ? 1 : 0);
break;
}
}
}
else{
this.TTPa[this.TTPd + 1] = (checkFlag ? 1 : 0);
}
}
};

// Function that will retrieve a whole data row by id.
this.exeGetRow = function(rowId){
return this.TTPa[rowId];
};

// Function that retrieves all rows.
this.exeGetRows = function(){
return this.TTPa;
};

// Function that retrieves all selected rows.
this.exeGetSelectedRows = function(){
var j = 0;
var selectedRows = new Array();
for (i in this.TTPa) {
if(this.TTPa[this.TTPd + 1] == 1){
selectedRows[j++] = this.TTPa;
}
}
return selectedRows;
};
}


icioicio - 5/2/2009 at 04:11 AM

May I use this functions for create like a memory of the table? I mean some time it is necessary back to the same page, into the same order..

Thank for any help


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/