title: how to hide other levels if some level row is selected in jqgrid treegrid
body: <p>If some row is selected in jqgrid treegrid all other rows are collapsed but still visible. how to hide them.</p>
  
  <p>For example if tree structure is</p>
  
  <pre><code>Category1
    Subcategory11
    Subcategory12
    ...
  Category2
    Subcategory21
    Subcategory22
    ...
  Category3
    Subcategory31
    Subcategory32
    ...
  </code></pre>
  
  <p>Initially it is shown in collapsed form in jqgrid</p>
  
  <pre><code>Toggle view
  Category1
  Category2
  Category3
  </code></pre>
  
  <p>User can open some node by click. In this case (for example clicking in Category2) other categories should be removed from screen so that only this category and its subcategories are visible:</p>
  
  <pre><code>Toggle view
  Category2
    Subcategory21
    Subcategory22
  </code></pre>
  
  <p><code>Toggle view</code> link should toggle single category and category list views: first time click should show collapsed category list again. 
  After that clicking in <code>Toggle show all categories</code> again should show only last opened category like in screenshot above.</p>
  
  <p>How to implement this ?</p>
  
  <p>treegrid is defined as</p>
  
  <pre><code>       var treegrid = $("#tree-grid");
          treegrid.jqGrid({
              loadComplete: function (data) {
                  $('.tree-leaf', $(this)).css('width', '0px');
              },
              url: '/Store/GridData',
              datatype: "json",
              mtype: "POST",
              height: "auto",
              loadui: "disable",
              treeGridModel: "adjacency",
              colModel: [
                      { name: "id", width: 1, hidden: true, key: true },
                      { name: "menu", classes: "treegrid-column", label: "Tootepuu" },
                      { name: "url", width: 1, hidden: true }
                  ],
  
              gridview: true,
              autowidth: true,
              treeGrid: true,
              ExpandColumn: "menu",
              rowNum: 2000,
              ExpandColClick: true,
              onSelectRow: function (rowid) {
                  var treedata = treegrid.jqGrid('getRowData', rowid);
                  window.location = treedata.url;
              }
          }
                  );
          treegrid.parents("div.ui-jqgrid-view").children("div.ui-jqgrid-hdiv").hide();
  </code></pre>
  
  <p>Currently it leaves while main category list also visible if some category is selected like</p>
  
  <pre><code>Category1
  Category2
    Subcategory21
    Subcategory22
  Category3
  </code></pre>
  
  <p>How to customze jqgrid for this ? Or can some other tree plugin or ASP.NET MVC2 control used for this ?</p>