Forum
14:12
03/08/2014
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:
How can I fix that?
14:32
Moderators
30/10/2007
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.
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