Checkbox in grid

when I paginate and use checkbox but it will be lost when I change the page. Can you help me?

5 Replies 1 reply marked as answer

BS Balaji Sekar Syncfusion Team May 27, 2021 10:21 AM UTC

Hi Toan, 
  
Thanks for contacting the Syncfusion support. 
  
Query: when I paginate and use checkbox but it will be lost when I change the page. Can you help me? 
  
Based on your query we suspect that you need to maintain the checkbox selection when pagination, so we suggest you use selectionSettings.persistSelection property which will persist the checkbox selection for all Grid operations. 
  
Please refer the below demo sample, Help Documentation for more information. 
  
  
  
Note: Any one of the column should be enabled as a primary key  
  
Please get back to us, if you need further assistance. 
  
Regards, 
Balaji Sekar 


Marked as answer

TB Toan Bui May 28, 2021 02:13 AM UTC

I did it. Thank you so much.
I am having another problem. I have a chart and a dropdownlist, when I select different values of the dropdownlist I want to change the type of the chart but it cannot.


BS Balaji Sekar Syncfusion Team May 28, 2021 11:28 AM UTC

Hi Toan,  

As of now it is not possible to automatically change the series value. Hence we suggest you to modify the series value using chart instance and refresh the chart to overcome the reported scenario. Please find the sample, code snippet and screenshot below.  

  
Code Snippet:  
// Add your additional code here  

<div align="center">  
    <ejs-chart #chart [primaryXAxis]="primaryXAxis" [primaryYAxis]="primaryYAxis" [tooltip]="tooltip"  
      [legendSettings]="legend" (loaded)="loaded($event)">  
      <e-series-collection>  
        <e-series *ngFor="let chart of traces" [dataSource]="chart.readings" type="{{chart.type}}"  
          xName="{{chart.xName}}" yName="{{chart.yName}}" width="2" [name]="chart.sensorId" [marker]="chart.marker"  
          [emptyPointSettings]="emptyPoint" pointColorMapping="color">  
        </e-series>  
      </e-series-collection>  
    </ejs-chart>  
  </div>  
 <ejs-dropdownlist id='games' [width]="width" #sample [dataSource]='sportsData' (change)='onChange($event)'  
        [value]='value' [fields]='fields' [popupHeight]='height' [popupWidth]="width">  
</ejs-dropdownlist>  
// add your additional code here  

public onChange(args: any): void {  
    for (let i = 0; i < this.chartObj.series.length; i++) {  
      this.chartObj.series[i].type = <ChartSeriesType>this.listObj.text;  
    }  
    this.chartObj.refresh();  
  }  

Screenshot:  
Default:  
  
  
AfterChange:  
   
  
Let us know if you have any concerns.  

Regards,  
Balaji Sekar 



TB Toan Bui May 31, 2021 06:40 AM UTC

Thank you so much


PG Praveenkumar Gajendiran Syncfusion Team June 1, 2021 01:53 PM UTC

Hi Toan, 

You are welcome. Please get back to us if you need further assistance. 

Regards, 
Praveenkumar G 


Loader.
Up arrow icon