def _buildColumns(self): seriesColumns = [ ColumnDefn(key, align="left", minimumWidth=100, valueGetter=value, # stringConverter = '%s') stringConverter='%Y-%m-%d %H:%M:%S' if "date" in key.lower() else'%s') for key, value in series.returnDict().iteritems()] self.SetColumns(seriesColumns)
def initTable(self, dbservice, site_id): """Set up columns and objects to be used in the objectlistview to be visible in the series selector""" seriesColumns = [clsExisting.ColumnDefn(key, align="left", minimumWidth=-1, valueGetter=value, stringConverter= '%Y-%m-%d %H:%M:%S' if 'date' in key.lower() else '%s') for key, value in series.returnDict().iteritems()] self.pnlExisting.olvSeriesList.SetColumns(seriesColumns) objects = dbservice.get_series_by_site(site_id= site_id) self.pnlExisting.olvSeriesList.SetObjects(objects)