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 perform Select All programatically in pivotgrid?

This is probably something really simple, but I could not find the solution neither in documentation nor forums: in this particular control (PivotGrid), how can I perform a programatic Select All?.
Thanks in advance. Greetings

1 Reply

JP Jagadeesan Pichaimuthu Syncfusion Team July 2, 2019 02:17 AM

Hi Carlos,

Thank you for contacting Syncfusion support.

We have analyzed the reported query “How to select the pivot grid cells by programmatically”. You can achieve this requirement by adding the specific grid ranges into the Selections property which is available in GridModel class. Now the PivotGrid loaded with some selections based on the given range in your application. 
  


Please refer the following code sample.
 
  
#MainWindow.xaml.cs 
  
        public MainWindow() 
        { 
            InitializeComponent(); 
            this.pivotGrid1.Loaded += PivotGrid1_Loaded; 
        } 
  
        private void PivotGrid1_Loaded(object sender, RoutedEventArgs e) 
        { 
            GridRangeInfo newrange = GridRangeInfo.Cells(5,2,3,4); 
            this.pivotGrid1.InternalGrid.Model.Selections.Add(newrange); 
        } 
  
  
  
If the above solution does not meet your actual requirement could you please share the detailed description about your requirement so that it could be helpful to provide the solution at the earliest.

Regards, 
Jagadeesan

Loader.
Live Chat Icon For mobile
Up arrow icon