/** * Ensure that the ID attribute is rendered and registers the javascript code * for initializing the active control if the event handler for the * {@link onRowSelected OnRowSelected} event is set. * @param THtmlWriter the writer responsible for rendering */ protected function addAttributesToRender($writer) { parent::addAttributesToRender($writer); $writer->addAttribute('id', $this->getClientID()); if ($this->hasEventHandler('OnRowSelected')) { $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions()); } }