Skip to content

Instantly share code, notes, and snippets.

@molotovbliss
Created October 31, 2013 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save molotovbliss/7253347 to your computer and use it in GitHub Desktop.
Save molotovbliss/7253347 to your computer and use it in GitHub Desktop.
Inline Renderer with onBlur JS Handler for ATWIX Inline Grid Editing.
// http://www.atwix.com/magento/inline-editing-in-magento-backend-grids/
public function render(Varien_Object $row)
{
$html = '<input type="text" ';
$html .= 'name="' . $this->getColumn()->getId() . '" ';
$html .= 'value="' . $row->getData($this->getColumn()->getIndex()) . '"';
$html .= 'class="validate-number input-text ' . $this->getColumn()->getInlineCss() . '" onblur="updateField(this, '. $row->getId() .'); return false"/>';
//$html .= '<button onclick="updateField(this, '. $row->getId() .'); return false">' . Mage::helper('deals')->__('Update') . '</button>';
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment