Just found MyTableGrid and am loving it! Great piece of software...
documentation lacks a little bit, but nothing too hard to handle.
I needed a way to regen parameters on the fly as well. Here is my
solution:
In the initialize function in tablegrid.js, just below the line
"
this.name = tableModel.name || '';" add a line that looks like this:
this.paramRegen = tableModel.paramRegen || null;
Then in the _retrieveDataFromUrl function, just below the line "var
self = this;" add the following:
params = self.request;
if (self.paramRegen != null) {
regenParams = self.paramRegen();
Object.extend(params, regenParams);
}
And just below that in the Ajax.Request, change the "parameters:
self.request," to "parameters: params,"
Then in the table model, you can supply a paramRegen function like so:
url: 'modules/admin/user/getUserTable.php',
paramRegen: function () {
var thisItem = new Object;
thisItem.showAll = CFescape($F('show_all'));
return thisItem;
}
Hope this helps someone else! I can upload the tablegrid.js file if
it would be of help.
-David
> > "MyTableGrid" group.> To post to this group, send email
tomyta...@googlegroups.com.
> > To unsubscribe from this group, send email to>
mytablegrid...@googlegroups.com<mytablegrid%2Bunsubscribe@googlegr
oups.com>
> > .