jqgrid dynamicall column with treegrid
===

I need treegrid-table-structure with dynamic columns-header. Column-header shows the day of the selected month from first day till last day. When a new month will be selected the header, colums and rows musst be updated. It works so far, but when i implement the treegrid option the column header will be shown, but the rows not.  

This is the sample code that im using, is there any working solution?

    var lastsel;

    $(document).ready($(function(){ 
        $.ajax({
            url:'/get-jq-grid-json/',
            datatype: 'json',
            type: 'POST',
            success: function(result){
                var obj = $.parseJSON(result);
                var colD = obj.couponStripList;
                var colM = obj.colModelList;
                var colN = obj.columnNames;

                var lastSel;
                    
                $("#grid").jqGrid({
                    url:'/get-jq-grid-json/',
                    jsonReader : {
                        root: "rows",
                        cell: "",
                        repeatitems: true,
                        id: "invid"
                    }, 
                    mytype: 'POST',
                    datatype: 'local',
                    data: colD.rows,
                    colNames: colN,
                    colModel: colM,
                    height: 'auto',
                    width: 'auto',
                    treeGrid: true,
                    ExpandColumn: 'name',
                    treeGridModel: 'adjacency',
                    treedatatype: "local",
                    onSelectRow: function(id) {
                        if(id && id!==lastSel){ 
                            $("#grid").restoreRow(lastSel); 
                            lastSel=id; 
                        } 
                        $("#grid").editRow(id, true); 
                    },
                    editurl:'/price-calendar/save-jq-grid/locationId/',
                    loadComplete: function(data){
                        alert('loaded');
                    },
                    loadError: function(xhr,status,error){
                        alert('error ' + error );
                    }
                });
            },
            error: function(x, e){
                alert(x.readyState + " "+ x.status +" "+ e.msg);
            }
            
          
        });
        setTimeout(function() {$("#grid").jqGrid('setGridParam',{datatype:'json'}); },500);

{<br />
   "colModelList":[<br />
      {<br />
         "name":"id",<br />
         "index":"id",<br />
         "width":100,<br />
         "hidden":true,<br />
         "key":true
      },<br />
      {<br />
         "name":"name",<br />
         "index":"name",<br />
         "width":200
      },<br />
      {<br />
         "name":"date01072012",<br />
         "index":"date01072012",<br />
         "width":45,<br />
         "editable":true
      },<br />
      {<br />
         "name":"date02072012",<br />
         "index":"date02072012",<br />
         "width":45,<br />
         "editable":true
      },<br />
      {<br />
         "name":"date03072012",<br />
         "index":"date03072012",<br />
         "width":45,<br />
         "editable":true
      },<br />
      {<br />
         "name":"date04072012",<br />
         "index":"date04072012",<br />
         "width":45,<br />
         "editable":true
      },<br />
      {<br />
         "name":"date05072012",<br />
         "index":"date05072012",<br />
         "width":45,<br />
         "editable":true
      }
   ],<br />
   "columnNames":[<br />
      "Id",<br />
      "Zimmer",<br />
      "01.07",<br />
      "02.07",<br />
      "03.07",<br />
      "04.07",<br />
      "05.07"<br />
   ],<br />
   "couponStripList":{<br />
      "rows":[<br />
         {<br />
            "invid":"55816_52511",<br />
            "id":"55816_52511",<br />
            "name":"Einzelzimmer",<br />
            "date01072012":"28.50",<br />
            "date02072012":"28.50",<br />
            "date03072012":"28.50",<br />
            "date04072012":"28.50",<br />
            "date05072012":"28.50",<br />
            "0":0,<br />
            "1":null,<br />
            "2":false,<br />
            "3":false<br />
         },<br />
         {<br />
            "invid":"55821_52516",<br />
            "id":"55821_52516",<br />
            "name":"Doppelzimmer (Double)",<br />
            "date01072012":"",<br />
            "date02072012":"",<br />
            "date03072012":"",<br />
            "date04072012":"",<br />
            "date05072012":"",<br />
            "0":0,<br />
            "1":null,<br />
            "2":false,<br />
            "3":false<br />
         },<br />

      ]<br />
   }<br />
}<br />

   




