jQGrid how add columns in groupText
I have grid where i want to group by multiple columns but jqgrid support only single column grouping, than I thought that i may groupt by one column and display all the rest columns using groupText : ['<b>{0} - {column1} {column2} {column3} {column4}</b>']
, but looks like it is problem as well, couldn't find how to do that, may be some one come across that?
this doc http://www.trirand.com/jqgridwiki/doku.php?id=wiki:grouping saying that i may use only {0}
which means that the group value name and {1}
which meant the the total cont 开发者_运维技巧of this group.
My data looking like that:
Id | Group | Column1 | Column2 |Column3 | Column4 Name
1 | 1 | 02-dec-2003 | Good | Rain | 1000 | Name1
2 | 1 | 02-dec-2003 | Good | Rain | 1000 | Name2
3 | 2 | 01-dec-2004 | Bad | Sun | 1000 | Name3
4 | 2 | 01-dec-2004 | Bad | Sun | 1000 | Name4
5 | 2 | 01-dec-2004 | Bad | Sun | 1000 | Name5
I was thinking group by Group and add Column1 Column2 Column3 Column4
in to grouping text.
Any ideas how i can do that or something similar?
Also i can combine my Columns in to one to produce something like that:
Id | Group | Name
1 | 1 02-dec-2003 Good Rain 1000| Name1
2 | 1 02-dec-2003 Good Rain 1000| Name2
3 | 2 01-dec-2004 Bad Sun 1000 | Name3
4 | 2 01-dec-2004 Bad Sun 1000 | Name4
5 | 2 01-dec-2004 Bad Sun 1000 | Name5
But I am thinking it will be slow to group by such long strings because grouping will be slow in such case.
I also have a similar problem. I'd like to group by multiple columns so that the collapsed row shows the grouped data once and uncollapsing it shows the detail.
精彩评论