DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Sun, 05 Aug 2007 17:21:42 -0000,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    unknown


Undo, redo functions in dgv.   
Dear all,

I met two problems.

1. "Undo" only worked when the XML file was loaded. However, it didn't
work when the new row is added in the dataTable ["a"] in dvg.

There are dgv, dataset and target xml file in my application.
Therefore, I wrote the codes as follows in the "Undo" button handler
function.

if (dgv.IsCurrentCellInEditMode)
  {
     // Nothing. If cell was in the EditMode, then cellMenuStrip will
show up when user right clicks on the cell.
  }
  else
  {
    DataTable _dt = dataSet.Tables["a"];
    _dt.RejectChanges();
   }

The problem is happening at the point _dt.RejectChanges(), due to the
reason that it can't be evaluated. (I don't know why.) The principle
in my "add row in table" is, e.g. new row is added in the dgv, then
update the bounded dataSet afterwards. The table["a"] in dataSet
worked correctly.

2. Is it possible for me to add the "redo" function in the
CellContextMenuStrip?

3. How shall I implement the "redo" in the dgv?

Thanks in advance,

Rush Hour.
Date:Sun, 05 Aug 2007 17:21:42 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us