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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to update only current page selection to server-end using header checkbox?

Platform: ASP.NET Core |
Control: Grid

This Knowledge base explains how to update only current page selected records to server-end using header checkbox on batch Editing.

Solution:

By default, Grid will select all the page records on clicking the header checkbox. To select only the currentPage records, we have used headertemplate property of the Grid to render the external checkbox in the header which act as header checkbox and handled the checkbox selection only to current page using actionComplete event.

1. Render the Grid control with actionComplete and dataBound event. Initialize the checkbox on column Header using headerTemplateID for type checkbox column.

HTML

JavaScript

 

MVC

RAZOR

 

C#

 

ASP.NET

ASPX

 

ASPX.CS

 

ASP.NET CORE

RAZOR

 

C#

Angular

 

 

2. In the dataBound event of the Grid, render the ejCheckBox and on change event of the checkbox, selected records will be collected and pushed to the getBatchChanges. Later, batchSave method will be called to update the changes to the Grid DataSource. The checkbox state also maintained on Paging, Sorting, Grouping functionalities using the actionCompete event.

JS

 

 

 

 

 

 

 

 

Output:

Sample Link:- http://jsplayground.syncfusion.com/xjmsplx2

 

 

2X faster development

The ultimate ASP.NET Core UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile