title: How to set filter in grid of admin in magento?
body: <p>I am working on magento 1.7 version.
  I have a grid in magento admin. When I click on a particular row it opens a form and two tabs in left sidebar.
  when I click on one tab it is displaying a grid in right side.
  Now I want that in this grid a filter should be auto selected.</p>
  
  <p>Ex.-</p>
  
  <p><a href="http://d.pr/i/UuB4" rel="nofollow">http://d.pr/i/UuB4</a>
  <a href="http://d.pr/i/BN1N" rel="nofollow">http://d.pr/i/BN1N</a></p>
  
  <p>In this, category should be auto selected in filter and how to get current row id in tabs.php in _beforeToHtml().</p>
  
  <p>I am using following code for tabs</p>
  
  <pre><code> protected function _beforeToHtml() {
  
      $this-&gt;addTab('form_section', array(
          'label' =&gt; Mage::helper('test')-&gt;__('Category'),
          'title' =&gt; Mage::helper('test')-&gt;__('Category'),
          'content' =&gt; $this-&gt;getLayout()-&gt;createBlock('test/adminhtml_category_edit_tab_form')-&gt;toHtml(),
      ));
  
      $this-&gt;addTab('tab_section', array(
          'label' =&gt; Mage::helper('test')-&gt;__('Images'),
          'title' =&gt; Mage::helper('test')-&gt;__('Images'),
          'content' =&gt; $this-&gt;getLayout()-&gt;createBlock('test/adminhtml_book_grid')                    
                  -&gt;toHtml()
      ));
  
  
      return parent::_beforeToHtml();
  }
  </code></pre>
  
  <p>any help would be much appreciated.</p>