public function render(Varien_Object $row) { $productId = $this->getRequest()->getParam('id'); $url = Mage::helper('adminhtml')->getUrl('*/adminhtml_video/attachVideoToProduct'); $id = $row->getVideoId(); $render = '<input type="checkbox" class="ajax-video-attach" id="video-attach-' . $id . '" data-url="' . $url . '" data-product-id="' . $productId . '" value="' . $id . '"'; if (in_array($id, $this->_getAttachedVideosToProduct())) { $render .= 'checked="checked"'; } $render .= '/>'; echo $render; }