| 1.已开启了 Undo/Redo 功能; 2.请任意作增删改操作，然后点击工具条的 Undo/Redo 按钮，查看数据恢复情况;

1.源码比较简单：
    function OnReady(id)
    {
     AF.func("Build", "treelist/orders.xml \r\n ListTreeSwitchAble=false; isHighLightModified=true; isHighLightNewRow=true");
     AF.func("load", "treelistdata/orders.txt \r\n FadeInStep=0");
     AF.func("deleteRows", "10\r\n100");
     AF.func("ResetChanged", "");
     AF.func("OpenFreeformBar","treelist/undoredo.xml \r\n tBar");  //打开topBar
     //开启Undo
     AF.func("EnableUndo", "");
     RefreshUndoButtonState();
    }

    function OnEvent(id, Event, p1, p2, p3, p4)
    {
     if(Event == "UndoState") {
      //Undo/Redo状态有变事件
      RefreshUndoButtonState();
     }
     else if(Event == "ButtonClicked") {
      //Undo/Redo按钮点击事件
      if(p1 == "btn1" || p1 == "btn2") {
       AF.func(p1 == "btn1" ? "undo" : "redo", "");
       RefreshUndoButtonState();
      }
     }
    }

    //取得UndoAble、RedoAble，将状态体现到工具条按钮
    function RefreshUndoButtonState()
    {
     var b = AF.func("UndoAble", "");
     AF.func("tBar.SetObjectProp", "btn1 \r\n enable \r\n" + (b==true ? "true" : "false"));
     b = AF.func("RedoAble", "");
     AF.func("tBar.SetObjectProp", "btn2 \r\n enable \r\n" + (b==true ? "true" : "false"));
    }