Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
499 views
in Technique[技术] by (71.8m points)

subgrid - JQGrid - How Can We make an Custom Row Detail

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 !

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...