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_Related Related Topics sp_TopicIcon
grouping data will be displayed unformatted
Tags: grouping
22/09/2010
22:52
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony!

I can find any way to have correct sorting of grouping data. I need to group data which has 'select' format. After the grouping the data from the groupText (I mean group header row) will be displayed unformatted. You can see the problem on the demo. I group here by the column 'subSource'. One can see that the data are displayed unformatted also here. It is the same grid, but with formatted date, grouped also by 'datetime'. So we have two problems 1) the data from the group header row will be displayed unformated 2) the sorting of data grouping column will be done as sorting of this unformated text information.

By the way index defined as function of sorttype defined as function on the grouping column will be not called. They will be used only if one click on the header of the corresponding column, but not during grouping sorting.

One more problem. If one define groupDataSorted: true parameter of groupingView then data will be displayed at the first time unsorted (because it is the feature for remote data), but after the click on the header of a column the grouping will be sorted as a strings. So the setting can not be used for the local data – only for remote data where the sorting do the server.

In the current grouping limitation I could not find anything about usage only string or number types.

Could you modify the code th display the data in groupText formated in the same way as the data in the grid?

Thank you
Oleg

24/09/2010
09:42
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello Oleg,

Thanks for both bugs.

I will correct these. The formatting will be ok, the problem is with sorting where we have two possible solutions

1. The develloper should point the type of the column - i.e number/date/string/ .... this will be the eystest way (I think that in this case the sorttype parameter in colModel should be used.)

2. Autodetect column type which is the most harder way. I prefer the first one and maybe I will implement it.

As for the groupDataSorted - this is true - all the things go to the server.

Kind Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

24/09/2010
11:28
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony!

I mean don't use autodetect of column type. I am not sure that it is possible in the general case.

I suppose that the usage of sorttype for sorting of grouping column is the best way. It is mostly close to the rest concept of local sorting in jqGrid and make full power of sorting working without writing a lot of additional code. More sofisticated types of sorting like the usage of index defined as function of sorttype defined as function will be also automatic work.

The formatting of group header row (the data from the groupText) seems me good to make in the same way as the formating of data in the corresponding column. Then one can really use the option groupColumnShow : [false] without missing a information. More sofisticated type of formating like will be also automatic work.

Thanks and best regards
Oleg

29/10/2010
05:21
Avatar
idrozd
Russia
New Member
Members
Forum Posts: 2
Member Since:
29/09/2010
sp_UserOfflineSmall Offline

2 OlegK: 

Hi. Any workaround with group header formatting?

3.8.1 still has this bug.

29/10/2010
13:26
Avatar
flack
Member
Members
Forum Posts: 5
Member Since:
01/08/2010
sp_UserOfflineSmall Offline

I don't know if this is directly related to the problem, but my strategy for formatting stuff in jqgrid is usually to render it directly in PHP the way I want it and to add an "index" column with the unformatted value that is used for sorting afterwards. F.x.:

          //This holds e.g. an HTML link or something
          {name:'project', index: 'index_project'},

          //This holds the unformatted cell value which is used for sorting
          {name:'index_project',index:'index_project', hidden: true},

To make this work for grouping headers, a small patch would be needed to grid.base.js:

http://github.com/flack/jqGrid.....27eb7a7bc2

But I was going to propose this for inclusion into mainline anyways :-)

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
24 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