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
close icon

Selecting columns or rows by headers does not select inner values

If you select a row by its headers, pivotGrid.SelectedItems returns ONLY the values on its headers.
Suppose you have:


If you select the cells by clicking 10,7886 and moving the cursor to 8,6421 you get the following in pivotGrid.SelectedItems:


and that's OK.

BUT if you make the visually -almost- same selection by clicking on 2004 and 2005 headers, you see the selection this way:


and you get this values on pivotGrid.SelectedItems:


I mean you only get the data of those two header-cells.

If there where even more rows, they will be visually selected but you always get only two header values without any of the selected cells below.
For example if you have something like this:

and you select the entire columns by clicking 2006 and 2007 you get this selectedItems:


The behavior when you select cells by row headers is the same.

Now, all of the above is with AllowSelectionWithHeaders="False". If I switch the grid to AllowSelectionWithHeaders="True", selection by column headers actually populates selectedItems with all the values (headers and cells) but ONLY if you select more than one header. I.e in the example above, if you select both 2006 and 2007 columns, you get those two headers plus all the cells in those columns in selectItems (and that's correct). BUT if you only click 2006 (and the column gets visually selected) you only get 2006 in selectedItems; you don't get the rest of the values in that column.

Greetings,

Fernando



9 Replies

CF Carlos Fernando Consigli May 25, 2019 01:39 AM UTC

Also, see this case:


Not only that selectedItems contains only one element but also it's reporting incorrectly the value "Column". It takes trngovrow as the column and that's not a column but only the first row header. This may not be so important, but as I'm trying to make a workaround for this, I'm trying to distinguish the header cells from the value cells while iterating the SelectedItems collection and that's why I stumble upon this.
As a suggestion, it would be useful to have a way to differentiate in code the value cells from the header cells and the total cells while iterating this SelectedItems collection. Currently I'm applying some rules and string comparison that are kind of ugly to accomplish that.
Thanks in advance for your help. Greetings,

Fernando




JP Jagadeesan Pichaimuthu Syncfusion Team May 27, 2019 11:45 AM UTC

Hi Carlos,

Please find our response as below,
 
 
Query 
Solution 
If you select a row by its headers, pivotGrid.SelectedItems returns ONLY the values on its headers. 
We can reproduce the reported issue – “Selected items are not returned properly when AllowSelection property value is enabled”. We will provide the patch file for the reported issue on June 10, 2019. 

Here we have provided a private feedback link, we ask you to log in to see the link further. If you have any more specification replication procedure or a scenario to be tested, you can add it as a comment in the portal. This fix will be available in our upcoming release of Volume 2 SP1, which is scheduled to be rolled out in July 2019. 

feedback link : https://www.syncfusion.com/feedback/6543/selected-items-are-not-returned-properly-when-allowselection-property-value-is-enabled
 
If I switch the grid to AllowSelectionWithHeaders="True", selection by column headers actually populates selectedItems with all the values (headers and cells) but ONLY if you select more than one header.  
We have checked the reported requirement “Selected items does not return the values correctly when AllowSelectionWithHeaders property is true”. But we are unable to reproduce the reported issue in our end. 
  
Please refer the attached videos from the following location: 
 
If we have misunderstood your actual requirement, please share the detailed description of your requirement along with working sample. 
Not only that selectedItems contains only one element but also it's reporting incorrectly the value "Column". It takes trngovrow as the column and that's not a column but only the first row header.  
We are unable to reproduce the reported issue in our end. We have prepared a sample based on your requirement.

Sample link: http://www.syncfusion.com/downloads/support/forum/144843/ze/Sample1579309166 

Could you please share your working sample or modify the attached sample to reproduce the reported problem, so that it may be helpful to provide the solution at the earliest.
 
  

Please let us know if you need further assistance.

Regards,
 
Jagadeesan


CF Carlos Fernando Consigli May 28, 2019 05:18 AM UTC

Ok, I see in the video that it works OK in your case, so this is something that fails in some specific case. With the few tests I did, I think (not completely sure) that it fails when you have one calculation with CalculationType=NoCalculation.
I'm attaching a sample. 

Test 1. Follow this steps:
1) Click the "Car" cell, i.e the one that it's in the bottom left
2) Click "Show Selected Items"

you'll see two odd thinks here
1) None of the white cells are being selected
2) The only selected cell is the one you clicked, and it has "Bike" as a column, which is the cell above but it's not actually a column header, it's just the first row header.

Test 2. Follow this steps:
1) Click the "Car" cell and holding the click down, move the cursor to the "Bike" cell so the two whole rows get selected
2) Click "Show Selected Items"

In this case you will see that all the "data" cells get selected. However, the data corresponding to the row header cells is still odd. You will see for example that the header cell "Car - FY 2006" has "Bike - FY 2005" as column (Column : Bike.FY 2005 ; Row : Bike - Bike.FY 2006 ; Value : FY 2006), and all the headers of the second column report "Bike.FY 2005" as their Column while column should be blank. This may seem not important, but as I use this selection to generate charts, I need some rule or pattern in order to distinguish header cells from data cells. And having row header cells with not null Column values makes really hard to do that distinction.


In this sample I'm attaching you can reproduce this selecting rows but apparently it works ok when selecting columns. I sincerely don't recall if I it ever happened with columns, but at least here you can see this particular case.

Greetings,

Attachment: SampleCellSelection_cbed2c79.zip


JP Jagadeesan Pichaimuthu Syncfusion Team May 28, 2019 11:45 AM UTC

 
Hi Carlos,

Thank you for the update.

Please find our response as below,
 
Query 
Solution 
Test 1. Follow this steps: 
1) Click the "Car" cell, i.e the one that it's in the bottom left 
2) Click "Show Selected Items" 
  
We can reproduce the reported issue – “PivotGrid displays the single header cell values in the selected items while clicking on the expander cells”. By default, the entire grid cells to be added in the selected items. 



 
Test 2. Follow this steps: 
1) Click the "Car" cell and holding the click down, move the cursor to the "Bike" cell so the two whole rows get selected 
2) Click "Show Selected Items" 
  
We can reproduce the reported issue – “Column header values are incorrect in the selected items values”. For example, “Bike” has been displayed as ‘column’ values for car header cells. 
  
 
  
As we promised earlier, we will provide the patch on June 10 and will also include the fix for above cases. 

Please ensure that you have faced the above issues in your application. Also let us know if you have faced any other issues at your end.

Regards,
 
Jagadeesan 



JP Jagadeesan Pichaimuthu Syncfusion Team June 10, 2019 12:47 PM UTC

Hi Carlos,

Sorry for the inconvenience caused.

Currently we are working on the issue with high priority. Due to complexity, as we need some more time to fix the reported issue and also we need to ensure the all scenarios from our side. So we will provide the patch file for the reported issue on June 13th, 2019.

We appreciate your patience until then.

Regards, 
Jagadeesan 



CF Carlos Fernando Consigli replied to Jagadeesan Pichaimuthu June 10, 2019 01:37 PM UTC

Hi Carlos,

Sorry for the inconvenience caused.

Currently we are working on the issue with high priority. Due to complexity, as we need some more time to fix the reported issue and also we need to ensure the all scenarios from our side. So we will provide the patch file for the reported issue on June 13th, 2019.

We appreciate your patience until then.

Regards, 
Jagadeesan 


No problem! I'm also a developer and I understand.
Greetings,

Fernando


JP Jagadeesan Pichaimuthu Syncfusion Team June 11, 2019 07:29 AM UTC

Hi Fernando, 
 
Thanks for your update. 
 
As we promised earlier, we will provide the fix for the reported issue on June 13th, 2019. 
 
We appreciate your patience until then. 
 
Regards, 
Jagadeesan 



TB Thirupathi Bala Krishnan Syncfusion Team June 13, 2019 03:10 PM UTC

Hi Carlos,

Thanks for your patience.

We have fixed the reported issues related to cell selection with headers property.
- PivotGrid displays the single header cell values in the selected items while clicking on the expander cells below.
 
- Column header values are incorrect in the selected items values.
As per current behavior, the pivot cell has row and column headers it displays the corresponding name in the Selected items list. Otherwise empty values are displayed in the Row/Column values.

Still we have faced some complexity, while fixing the issue –“
Selected items are not returned properly when AllowSelection property value is enabled related to normal cell selection property. So we need some more time to resolve the issue at our end. So we will provide the patch file on or before 19th June, 2019.

Please find the patch file from the following location:

 
V17.1.0.38  
Recommended approach – exe will perform automatic configuration            
Please find the patch setup here:                                  
         
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment                             
Please find the patch assemblies alone from:             
  
Please find the Nugets from the below location:            
           
            
NOTE
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
https://www.syncfusion.com/support/directtrac/patches
         
          
Disclaimer:                           
Please note that we have created this patch for the version 17.1.0.38 specifically to resolve the issues reported in this forum #144843. If you have received other patches for the same version for other products, please apply all patches in the order received. This fix will be included in our Volume 2 SP1 which will be available in the July 2019.   

Please let us know if you need any further assistance.
 

Regards,
Thirupathi B.
 



TB Thirupathi Bala Krishnan Syncfusion Team June 19, 2019 02:14 PM UTC

Hi Carlos,

Thanks for your patience.

We have fixed the below reported issues related to cell selection property.
Selected items are not returned properly when AllowSelection property value is enabled.
 
- Column header values are incorrect in the selected items values. 

As per current behavior, column headers don’t have the row values in the selected items property(empty string to be displayed). Similarly, Row headers don’t have the column values in the selected items property. For example, if you click the car header(Row), the corresponding column values are not displayed, It displays “Column : Row : Bike - Bike.FY2005 : Value : FY2005.”
 
 


Please find the patch file from the following location:

 
V17.1.0.38   
Recommended approach – exe will perform automatic configuration             
Please find the patch setup here:                                   
          
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment                              
Please find the patch assemblies alone from:              
   
Please find the Nugets from the below location:             
            
             
NOTE
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
https://www.syncfusion.com/support/directtrac/patches
          
           
Disclaimer:                            
Please note that we have created this patch for the version 17.1.0.38 specifically to resolve the issues reported in this forum #144843. If you have received other patches for the same version for other products, please apply all patches in the order received. This fix will be included in our Volume 2 SP1 which will be available in the July 2019.

Please let us know if you need any further assistance.
  

Regards,
Thirupathi B.
 
 
 


Loader.
Live Chat Icon For mobile
Up arrow icon