jqPivot에 jqGrid를 사용하고 있습니다.jqPivot totalText : 옵션 totalText : "{0} {1}". 멤버 대신 집합의 레이블로 {1}을 (를) 대체 할 수 있습니까?
내 문제는 jqPivot의 totalText입니다. 문서에서 : totalText : "{0} {1}"
가 totalText 옵션이 {0} 및 {1} 가 응집체 [I] .aggregator 및 응집체로 대체 될 것이다 [I와 템플릿을 포함 ] .member
집계 [i] .member 대신 aggregates [i] .label을 {1}로 바꿀 수 있습니까? 당신은 대신 콜백 함수로 totalText
을 사용할 수 있습니다
var pvConfig = {
footerTotals: true,
footerAggregator: "sum",
totals: true,
totalHeader: "Tổng cộng",
totalText: "{0} {1}",
useColSpanStyle: true,
xDimension: [
{ dataName: 'ten_vt', label: 'Tên vật tư', width: 150, },
],
yDimension: [
{ dataName: 'ma_ct_gd', totalHeader: '' },
],
aggregates: [
{ member: 'du_dau', aggregator: 'count', summaryType: 'count', label: 'Dư đầu' },
{ member: 'du_cuoi', aggregator: 'sum', summaryType: 'sum', label: 'Dư cuối' }
]
}
그리고
사용하는 jqGrid의 버전과 jqGrid ([free jqGrid] (https://github.com/free-jqgrid/jqGrid), 상업용 [Guriddo jqGrid JS] (http://guriddo.net /? page_id = 103334) 또는 버전 <= 4.7의 이전 jqGrid? 'jqPivot'을 호출하거나 문제를 재현하는 데모를 게시하는 데 사용하는 코드를 게시해야합니다. – Oleg
@Oleg, "sum Dư đầu", "sum Dư cuối"와 같은 totalText를 원하지만 "sum du_dau", "sum du_cuoi"는 원하지 않습니다. 의견 있으십니까? – Tommy1209