public function onPreRender($param)
{
parent::onPreRender($param);
if (!$this->getPage()->getIsPostBack() || $this->getViewState('CurrentClass') != $this->getRecordClass()) {
$this->initializeSort();
$this->setViewState('CurrentClass', $this->getRecordClass());
}
$this->loadRecordData();
}