Need a special offer?Find out if your project fits.
+

Customizecells not accessible from pivot

Answered
kumar asked on February 24, 2017

Hi,
I am calling customizeCells method from flexmonster.toolbar.js when clicks on one of the radiobutton from options window. but, method is not accessible through self.pivot. Do you have any suggestion?
Example:

FlexmonsterToolbar.prototype.showOptionsDialog = function() {
if (onRepeatValuesCbx.checked) {
self.pivot.customizeCell(function(html, data) {
if (data && data.type == "header" && data.member && data.label == "") {
return "    " + data.member.caption;
}
});
}
}

 

10 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster February 24, 2017

Hello Kumar,
Thank you for the sample. Please try to replace self with this. Does it help?
Regards,
Tanya

Public
kumar February 24, 2017

Hi Tanya,
this.pivot is undefined in the FlexmonsterToolbar.prototype.showOptionsDialog event(flexmonster.toolbar.js). please check it and let me know if there is any ideal way to access this.
Thanks,
Sunilkumar.V

Public
Tanya Gryshko Tanya Gryshko Flexmonster February 24, 2017

Hello Kumar,
Thank you for your response.
We have reproduced the issue on our side.
The fix will be ready in the minor release 2.311 (ETA Mar 13).
Regards,
Tanya

Public
Tanya Gryshko Tanya Gryshko Flexmonster March 14, 2017

Hello Sunilkumar.V,
I am glad to inform you that the minor release 2.311 is available for download now.
You are welcome to update the component.
The best way to access customizeCells method is to use flexmonster.customizeCell . Your example should be modified the following way:

FlexmonsterToolbar.prototype.showOptionsDialog = function() {
if (onRepeatValuesCbx.checked) {
flexmonster.customizeCell(function(html, data) {
if (data && data.type == "header" && data.member && data.label == "") {
return "    " + data.member.caption;
}
});
}
}

We would be grateful for your feedback.
Regards,
Tanya

Public
kumar March 27, 2017

Hi Tanya,
Great! it's working. one issue we noticed in the export.
When we have customizecells in ON, if we export it to excel it's not exporting with repeated values. happening like normal export. Can we expect this fix in coming minor releases?
thanks & Regards,
Sunilkumar.V

Public
Tanya Gryshko Tanya Gryshko Flexmonster March 29, 2017

Hello Sunilkumar.V,
Thank you for reporting the issue. We will fix the issue with the export to excel in the minor release 2.313 (ETA Apr 10). Does it work for you?
Regards,
Tanya

Public
kumar April 3, 2017

yes, Thanks Tanya!..

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster April 10, 2017

Hello Sunilkumar.V,
I am glad to inform you that the export of customized cells is ready in the 2.313 version which is available for download now.
You are welcome to update the component.
Kind regards,
Dmytro

Public
kumar September 13, 2017

Hi,
Repeat values functionality not working in 2.4 version with below logic..the same which is working fine in 2.3 version.
Is there anything that we have to use different here?
FlexmonsterToolbar.prototype.showOptionsDialog = function() {
if (onRepeatValuesCbx.checked) {
flexmonster.customizeCell(function(html, data) {
if (data && data.type == "header" && data.member && data.label == "") {
return "    " + data.member.caption;
}
});
}
}
 
Thanks & Regards,
Sunilkumar.V

Public
Ian Sadovy Ian Sadovy Flexmonster September 13, 2017

Hello Sunilkumar,
 
Thank you for the question.
You are right, customizeCell feature has been changed.
To be more specific, html argument was replaced with a cell builder object.
So, your function should be changed as follows:

flexmonster.customizeCell(function(html, data) {
if (data && data.type == "header" && data.member && data.label == "") {
cell.text = "    " + data.member.caption;
}
});

Please find more details in the migration guide.
 
Regards,
Ian

Please login or Register to Submit Answer