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
Group sorting doesn't work
03/08/2014
14:12
Avatar
itdevroman
New Member
Members
Forum Posts: 2
Member Since:
03/08/2014
sp_UserOfflineSmall Offline

Hello!

Data in my jqGrid grouped by campaign name. But when I'm trying to order groups by any column, data will be ordered only inside the group. But groups ordered randomly.

 

Code:

$('#b-summary__table').jqGrid({
url: "db.php?action=showbyid&siteid1&limit=10000",
datatype: "xml",
height: 'auto',
cellLayout: '0',
colNames: [ 'Кампания', 'Ключевое слово', 'Показы', 'CTR', 'Клики', 'Цена клика', 'Общие затраты', 'Лиды', 'CV 1', 'Продажи', 'CV 2', 'Выручка', 'CPL', 'CPO', 'ROI'],
colModel: [
{name: 'campaign_name', index: 'campaign_name', width: 300, align: 'center',sorttype:'text'},
{name: 'key', index: 'key', width: 300, align: 'center',sorttype:'text'},
{name: 'shows', index: 'shows', width: 60, align: 'center', summaryType:'sum', summaryTpl:'{0}'},
{name: 'ctr', index: 'ctr', width: 35, align: 'center', summaryType:'avg', summaryTpl:'{0}'},
{name: 'click', index: 'clicks', width: 43, align: 'center',summaryType:'sum', summaryTpl:'{0}'},
{name: 'clickprice', index: 'clickprice', width: 60, align: 'center',summaryType:'avg', summaryTpl:'{0}'},
{name: 'totalprice', index: 'totalprice', width: 60, align: 'center',summaryType:'sum', summaryTpl:'{0}'},
{name: 'leads', index: 'leads', width: 40, align: 'center',summaryType:'sum', summaryTpl:'{0}'},
{name: 'cv1', index: 'cv1', width: 35, align: 'center',summaryType:'avg', summaryTpl:'{0}'},
{name: 'sellscount', index: 'sellscount', width: 65, align: 'center',summaryType:'sum', summaryTpl:'{0}'},
{name: 'cv2', index: 'cv2', width: 35, align: 'center',summaryType:'avg', summaryTpl:'{0}'},
{name: 'proceeds', index: 'proceeds', width: 62, align: 'center',summaryType:'sum', summaryTpl:'{0}'},
{name: 'cpl', index: 'cpl', width: 30, align: 'center',summaryType:'avg', summaryTpl:'{0}'},
{name: 'cpo', index: 'cpo', width: 30, align: 'center',summaryType:'avg', summaryTpl:'{0}'},
{name: 'roi', index: 'roi', width: 30, align: 'center',summaryType:'avg', summaryTpl:'{0}'},
],
rowNum: 1000,
rowList: [1000,2000,5000,10000],
pagerpos: 'right',
grouping: true,
groupingView : {
groupField: ['campaign_name'],
groupDataSorted: true,
plusicon: 'ui-jqgrid-plus-icon',
minusicon: 'ui-jqgrid-minus-icon',
groupSummary : [true],
groupColumnShow : [true],
groupCollapse: true,
groupSummaryPos: ['header'],
groupText : ['<b>{0}</b>'],
groupOrder: ['desc'],
summaryRoundType: 'fixed',
summaryRound: 2
}
});

Screenshot:

Image Enlarger

How can I fix that?

03/08/2014
14:14
Avatar
itdevroman
New Member
Members
Forum Posts: 2
Member Since:
03/08/2014
sp_UserOfflineSmall Offline

And - summaryRound the same question.

11/08/2014
14:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

 

summaryRound is column property and not a groupView one. Set it in certain column.

Please explain what you expect and what is happen?

 

I see you use server side code to get the data. The data should be sorted in appropriate way before it is send to the grid.

See what is posted as sorting data when you perform the sort.

We post the grouping fields too, which should be take in account in your server

 

Regards

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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