Hello,
I have a Power Table where I use the onCellEdited Extension Function to add editing capability to the table. The Extension Function looks like this:
[code]id = self.data.getValueAt(rowIndex, self.updateTableIdName)
query = “UPDATE [%s] SET [%s] = ? WHERE [%s] = ?” % (self.updateTableName, colName, self.updateTableIdName)
args = [newValue, id]
system.db.runPrepUpdate(query, args)
system.db.refresh(self, “data”)
[/code]
updateTableIdName and updateTableName are custom properties on the power table.
I’ve then created a template using this Power Table. The template has 3 template parameters:
- Data {DataSet}
- updateTableIdName {String}
- updateTableName {String}
I then bind the Power Table’s (in the template) Data, updateTableIdName updateTableName to the template parameters I just mentioned.
Edits get written to the database in both the non templated and templated Power Tables. However, only the non templated Power Table is refreshed.
Thanks in advance,
Brian