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.

Undo/Redo

Thread ID:

Created:

Updated:

Platform:

Replies:

22637 Dec 16,2004 09:57 PM Dec 20,2004 03:04 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 16, 2004 09:57 PM

Hi, I am doing Undo/Redo But Undo of the cell is happening but the Redo is not. I did following steps similar to the Undo Redo sample: this.m_PretestListingGrid.Model.CommandStack.Undo(); this.m_PretestListingGrid.Model.CommandStack.Redo(); After Undo when i checked the redo stack it is zero this.m_PretestListingGrid.Model.CommandStack.RedoStack.Count; Any idea why this is happening Thankz Pratiksha

Administrator [Syncfusion]
Replied On December 17, 2004 04:29 AM

Do you see the problem in our sample? It may have something to do with how you are triggerring the undo/redo. If you are using menu items or toolbar button, then the action is not triggerring validation. At the beginning of your menu/button handlers, try calling this.Invalidate() to see if this makes things work. If you can upload a sample showing the problem, we can try to debug it here.

Administrator [Syncfusion]
Replied On December 20, 2004 02:23 AM

hi, When i analysed below, I have PreprateviewStyleInfo in that i have following 3 lines If i comment out thses lines Redo works. Means they can not be done simultaneously? Where these 3 lines should be called so that m_PretestListingGrid.Model.Cols.FreezeRange(0,1); m_PretestListingGrid.Model.Cols.FreezeSelection(); //Hide the first column m_PretestListingGrid.Model.Cols.Hidden[0] = true; Where can above piece of the code called? because when i do cut insert column or cut insert row in every case i have to set these properties. >Do you see the problem in our sample? > >It may have something to do with how you are triggerring the undo/redo. If you are using menu items or toolbar button, then the action is not triggerring validation. At the beginning of your menu/button handlers, try calling this.Invalidate() to see if this makes things work. > >If you can upload a sample showing the problem, we can try to debug it here.

Administrator [Syncfusion]
Replied On December 20, 2004 03:04 AM

You should not do such code in PrepareViewStyleInfo as that event is raised too often for such code. I would wrap this code in a method, and then call this method whenever you need to, say after the line of code that you are using to cut/insert a row or column.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;