# -*- coding: utf-8 -*-

import dabo
if __name__ == "__main__":
	dabo.ui.loadUI("wx")
from GrdBase import GrdBase


class Grd%(tableName)s(GrdBase):

	def afterInitAll(self):
		super(Grd%(tableName)s, self).afterInitAll()
		biz = self.Form.getBizobj("%(datasource)s")

		if not biz:
			# needed for testing
			class Biz(object):
				def getColCaption(self, caption):
					return caption
			biz = Biz()


%(colDefs)s


if __name__ == "__main__":
	from Frm%(tableName)s import Frm%(tableName)s
	app = dabo.dApp(MainFormClass=None)
	app.setup()
	class TestForm(Frm%(tableName)s):
		def afterInit(self): pass
	frm = TestForm(Caption="Test Of Grd%(tableName)s", Testing=True)
	test = Grd%(tableName)s(frm)
	frm.Sizer.append1x(test)
	frm.show()
	app.start()
