Forum
08:17
25/01/2014
Our Scenario is , We are sorting the data on sequence no on server side, and grouping by name on front end,
as it take default sort on grouping, it is sorted based on the alphabetical order, which is not required in our case it should sort only the sequence number.
My alternative approach is, I can group by sequence number, but I need the name to be displayed on the group text.
Thanks ,
14:59
22/05/2013
in order to group by something it has to be sorted by that same index, otherwise your groups are going to be all messed up and out of order. Are you looking for nested groups in this case ? Primary grouping would be by sequence number and then within each of those groups you would group by name ? Or are you looking to group by sequence number and then order by name within each group ?
10:18
25/01/2014
Not sub grouping let me give an example..
Sequence no Name
1 bbb
1 bbb
1 bbb
2 aaa
2 aaa
2 aaa
If I group by name --> aaa will be coming first and it will display as aaa
if I group by seqno ---> bbb will be coming on first displaying 1
My requirement, I need to display bbb on first by grouping so I can group by sequence no.
13:53
22/05/2013
are you using a remote datasource like a php backend with SQL ?
If you are always going to be grouping in this fashion (i.e. it is not dynamic) then you can configure your grouping on the name column.
Normally if you do this, jqGrid will send the sidx parameter of the request to sort on the name column, which is what you dont want. The thing is though, you dont have to honor it. Override your sql query to force it to always group on the sequence number. When you are returning the data though, use the name column instead of the sequence number. Here is an example of this
pasting code here is terribly painful so i hijacked a jsFiddle
note, the fiddle will NOT run, but you can copy/paste it into your own application to see the result. Here is a picture as well
Most Users Ever Online: 715
Currently Online:
28 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66