grouptext

Questionsgrouptext
Lynn Lollar asked 10 years ago

I'm an needing a way to change the grouptext label to something like:

Bartenders 6 – 3 Item(s)

Changing text color would also be nice.

Thanks.

3 Answers
Abu Ghufran answered 10 years ago

Group text label is supported in following format.

// {0} is grouped value, {1} is count in group
$grid["groupingView"]["groupText"] = array("<b>{0} – {1} Item(s)</b>");

You can set text color using css (thanks for firebug css inspector)

.jqgroup b {
color: #FF0000;
}

Abu Ghufran answered 10 years ago

Only {0} and {1} is supported for now in core lib (jqGrid)

http://www.trirand.com/jqgridwiki/doku.php?id=wiki:grouping&s%5B%5D=grouptext

groupText – Defines the grouping header text for the group level that will be displayed in the grid. By default if defined the value if {0} which means that the group value name will be displayed. It is possible to specify another value {1} which meant the the total cont of this group will be displayed too. It is possible to set here any valid html content.

Lynn Lollar answered 10 years ago

Thanks for the reply, but it doesn't quite answer my question.

I need to know how you arrive at {0} and/or how can I reference other information pertaining to a different row. For instance, the row just below the group heading. Or add a sql select within that command. I need to add the QTY of bartenders I need which is in another table.

Thanks again.

Your Answer

19 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?