We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to iterate through Pivot Field Items

I need to loop through pivot field Items,
when I used for loop,
pivotField.Items[i].Text returns null .
But I found that there is a non -public member Name from Items[]
A solution on how to access it will be helpful.

Your quick response is appreciated.

Thank you in Advance!

4 Replies

AV Abirami Varadharajan Syncfusion Team April 30, 2019 12:06 PM UTC

Hi Mani, 

We have prepared sample to access the internal property ‘Name’ using reflection which returns the name of the pivot field item. The sample can be downloaded from following link. 


Please check and let us know if this is helpful. 

Regards, 
Abirami 



MB Mani Barathi Saravanan April 30, 2019 12:35 PM UTC

Hello Abirami,

Thank you for the solution. This is what I was expecting.

But if the pivot Item label is (blank) in Excel, it shows null.
Is this the behavior of syncfusion or is there a way to get that as well?


MB Mani Barathi Saravanan April 30, 2019 12:38 PM UTC

Can the below incident be looked into and actioned at the earliest?

https://www.syncfusion.com/support/directtrac/incidents/234789



AV Abirami Varadharajan Syncfusion Team May 2, 2019 08:33 AM UTC

Hi Mark, 

Please find the details below. 

Queries 
Details 
But if the pivot Item label is (blank) in Excel, it shows null. 
Is this the behavior of syncfusion or is there a way to get that as well? 
When the pivot item label is blank, we will return ‘Name’ property as Null. This is the behaviour of XlsIO. However, we have modified the sample to return the blank label as Null and the sample can be downloaded from the following link. 
 
 
 
Can the below incident be looked into and actioned at the earliest? 
 
We have posted the solution for your query in mentioned incident. Please log on to our support website to check for further updates.      
       
      
 

Regards, 
Abirami 


Loader.
Live Chat Icon For mobile
Up arrow icon