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

How to handle tri-state checkbox in the batch editig?

Grid provides an option edit the Boolean column using Checkbox. Usually, check/uncheck state was provided for editing functionality. To handle the tristate in the checkbox, you have to use the EditTemplate feature of the Grid Columns. Using this ejCheckbox was rendered to handle the intermediate state along with the check/uncheck state. Follow the KB for handling the intermediate state of checkbox in the Batch Editing.

Render the Grid with the EditTemplate to the respective Boolean column, QueryCellInfo and BeforeBatchSave event.

HTML:

 

JavaScript:

 

Razor:

 

Controller:

 

WebForms:

 

 

.Net Core

 

 

Define the Create, Write and Read events of the EditTemplate to create/render/retrieve values from the ejCheckBox to the ejGrid. QueryCellInfo event defined to modify the Native Checkbox element to the ejCheckBox for displaying the intermediate state. BeforeBatchSave event used to set the Boolean values to the respective Boolean column.

 

Angular2:

 

TypeScript:

 

Figure. Grid with Tristate checkbox in Boolean column

 

Article ID: Published Date: Last Revised Date: Platform: Control:
9233 08/31/2018 08/31/2018 ASP.NET MVC Grid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.