JQGrid - How Can We make an Custom Row Detail
Asked Answered
H

1

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 !

Homogeny answered 6/11, 2010 at 18:29 Comment(0)
T
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:

Technics answered 6/11, 2010 at 22:23 Comment(1)
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)?Sergio

© 2022 - 2024 — McMap. All rights reserved.