Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
jqGrid alternate rows within each group
07/11/2011
18:44
Avatar
milad
Member
Members
Forum Posts: 33
Member Since:
03/10/2011
sp_UserOfflineSmall Offline

I know how to add alternating rows, but what I would like to do is have the alternating rows apply against each group so that each group begins with a specific background-color, and then have each other row within that group alternate.  With standard alternating rows, what happens, if there is only one row in a group, the next group's first row alternates to the alternating row background-color, but as I said, I would like each group's first row to begin with the same color for consistenancy.  What is the best way to pull this off?

Thanks.

07/11/2011
19:29
Avatar
milad
Member
Members
Forum Posts: 33
Member Since:
03/10/2011
sp_UserOfflineSmall Offline

Heads up, I tried to do this like below, but then realized that rows are not children of a group row, so it will not work?

loadComplete: function () {                   
                    $("tr.jqgroup").each(function () {                                        
                        $(this).children("tr.jqgrow").each(function (index) {
                            if (index % 2 != 0) {
                                $(this).css("background", "#DDDDDC");
                            }    
                        });
                        
                    });
                },

my thinking is I might be able to do this with jQuery, but I need to determine the apropriate way to associate a group row to the rows within that group.  Thanks.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
53 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information