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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to UNDO the Covered Ranges of the Grid?

Platform: WinForms |
Control: GridControl |
Published Date: April 29, 2016 |
Last Revised Date: April 29, 2016
Tags: undoredo

By default, the covered ranges cannot be UNDO from the GridControl. This can be achieved by creating the custom GridModelSetCoveredRangesCommand derived from the GridModelCommand. The covered ranges have to be pushed to the command stack of the GridControl using the Push method of the CommandStack property.

The UNDO operation will reload the covered ranges once CTRL + Z key is pressed after the covered ranges is cleared from the GridControl.

GridModelSetCoveredRangesCommand class





Undo and Clear the covered ranges

In the below sample, the covered ranges can be cleared by clicking the ‘Clear covered ranges’ button. And covered ranges can be added to the command stack collection by clicking the ‘Undo the covered ranges’ button. The covered ranges can be restored by pressing CTRL+Z.






C#: Undo/Redo

VB: Undo/Redo

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.

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