11

Some one give me the some Sample Code to make my Grid like this.I read in document that jqgrid just supports subgrid.

like this page in Hierachy http://trirand.net/demoaspnetmvc.aspx

thanks !

Oleg
  • 220,925
  • 34
  • 403
  • 798
lovedota
  • 111
  • 2
  • 5

1 Answers1

17

On the page Custom Row Detail you can see how you can use subGridRowExpanded event handle to show custom HTML data as subgrid data. In general if you have any standard jqGrid you can implement the same very easy. You should just add subGrid: true to the grid and define subGridRowExpanded which append html to the subgrid:

subGridRowExpanded: function(subgrid_id, row_id) {
    var html = "<span>Some HTML text which corresponds the row with id="+
               row_id + "</span><br/>";
    $("#" + subgrid_id).append(html);
}

You can see this live here:

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Is it possible to remove the first column from the subgrid? Removing the first column of the parent grid is easy but I can't find a way to remove the column from the subgrid easily. Is there an easy way of doing it (using the example on this page)? – Nigel Jul 16 '12 at 13:38