Posted 8 January 2018, 4:55 am EST
Hi,
Is it possible to disable the existing subtotals in wijmo flex grid.
I want to bind my own subtotal coming from back-end which is a part of the json.
Thanks in advance.
Forums Home / Wijmo / General Discussion
Posted by: jignesh.jain on 8 January 2018, 4:55 am EST
Posted 8 January 2018, 4:55 am EST
Hi,
Is it possible to disable the existing subtotals in wijmo flex grid.
I want to bind my own subtotal coming from back-end which is a part of the json.
Thanks in advance.
Posted 8 January 2018, 5:49 am EST
Hi Jignesh,
The existing value may be overwritten using FlexGrid setCellData method. Please refer to the fiddle for the same.
http://jsfiddle.net/mkgupta911/6GB66/885/
~Manish
Posted 12 January 2018, 3:40 am EST
Hi Manish,
My subtotal will be directly a part of the json and I want to bind it to the flex grid.
I am sending you the sample json output.
[
{
"Product":"Aoba",
"Country":"Russia",
"Sales":"5535",
"Downloads":8668
},
{
"Product":"Aoba",
"Country":"Russia",
"Sales":null,
"Downloads":8668
},
{
"Product":"Aoba",
"Country":null,
"Sales":null,
"Downloads":20664
},
{
"Product":null,
"Country":null,
"Sales":null,
"Downloads":57791
},
{
"Product":"Aoba",
"Country":"China",
"Sales":"7361",
"Downloads":378
},
{
"Product":"Aoba",
"Country":"China",
"Sales":null,
"Downloads":378
},
{
"Product":"Olap",
"Country":"China",
"Sales":"3558",
"Downloads":5142
},
{
"Product":"Olap",
"Country":"China",
"Sales":null,
"Downloads":15059
},
{
"Product":"Olap",
"Country":null,
"Sales":null,
"Downloads":31825
},
{
"Product":"Olap",
"Country":"Russia",
"Sales":"1724",
"Downloads":7644
},
{
"Product":"Olap",
"Country":"Russia",
"Sales":null,
"Downloads":7644
},
{
"Product":"Wijmo",
"Country":"US",
"Sales":"9403",
"Downloads":4781
},
{
"Product":"Wijmo",
"Country":"US",
"Sales":null,
"Downloads":4781
},
{
"Product":"Wijmo",
"Country":null,
"Sales":null,
"Downloads":5302
},
{
"Product":"Aoba",
"Country":"US",
"Sales":"7917",
"Downloads":2408
},
{
"Product":"Aoba",
"Country":"US",
"Sales":null,
"Downloads":2408
},
{
"Product":"Wijmo",
"Country":"China",
"Sales":"7016",
"Downloads":521
},
{
"Product":"Wijmo",
"Country":"China",
"Sales":null,
"Downloads":521
},
{
"Product":"Aoba",
"Country":"India",
"Sales":"2983",
"Downloads":9210
},
{
"Product":"Aoba",
"Country":"India",
"Sales":null,
"Downloads":9210
},
{
"Product":"Olap",
"Country":"India",
"Sales":"5783",
"Downloads":9122
},
{
"Product":"Olap",
"Country":"India",
"Sales":null,
"Downloads":9122
},
{
"Product":"Olap",
"Country":"China",
"Sales":"4188",
"Downloads":9917
}
]
Can you help me with this?
Thanks,
Jignesh Jain
Posted 15 January 2018, 1:01 am EST
Hi Jignesh,
In the sample JSON , there is no subtotal. Hence, there ate two case for this.
Total Row wise
Total column wise
Please refer to the above fiddle for adding sub total for column provided in JSON.
For Row’s subtotal, please refer to the following JSON:
data=[{
"id":4,
"country":"India",
"sales":7978,
"expenses":899,
"subtotal":5666
}]
In this case, total would be a part and display as column. You may change CSS for column using cssClass property.
~Manish