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
Disable sorting on Grouping View
25/01/2014
17:05
Avatar
krishnakumarceg
Member
Members
Forum Posts: 4
Member Since:
25/01/2014
sp_UserOfflineSmall Offline

Immediate requirement,

Need to Disable sorting on Grouping view,

Else Display the Different column name on GroupText 

Regards

27/01/2014
13:52
Avatar
Lonewolf217
Member
Members
Forum Posts: 32
Member Since:
22/05/2013
sp_UserOfflineSmall Offline

is grouping optional in your grid ?

or are you always wanting to disable sorting. 

If you are grouping on one column, why would you want to display a different column name in the group text.  Are you trying to display the column name or the column value ?

28/01/2014
08:17
Avatar
krishnakumarceg
Member
Members
Forum Posts: 4
Member Since:
25/01/2014
sp_UserOfflineSmall Offline

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 ,

28/01/2014
14:59
Avatar
Lonewolf217
Member
Members
Forum Posts: 32
Member Since:
22/05/2013
sp_UserOfflineSmall Offline

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 ?

29/01/2014
10:18
Avatar
krishnakumarceg
Member
Members
Forum Posts: 4
Member Since:
25/01/2014
sp_UserOfflineSmall Offline

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.

29/01/2014
13:53
Avatar
Lonewolf217
Member
Members
Forum Posts: 32
Member Since:
22/05/2013
sp_UserOfflineSmall Offline

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

http://jsfiddle.net/4N3rR/1/

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

DemoImage Enlarger

Forum Timezone: Europe/Sofia

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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information