不能添加到指定的行,只添加到最后一行,真是奇怪了。
- <%@ Register Assembly="FarPoint.Web.Spread, Version=8.40.20151.0, Culture=neutral, PublicKeyToken=327c3516b1b18457" Namespace="FarPoint.Web.Spread" TagPrefix="FarPoint" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title></title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
- </div>
- <FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="#A0A0A0" BorderStyle="Solid" BorderWidth="1px" Height="200" Width="400">
- <CommandBar BackColor="#F6F6F6" ButtonFaceColor="Control" ButtonHighlightColor="ControlLightLight" ButtonShadowColor="ControlDark"></CommandBar>
- <Sheets>
- <FarPoint:SheetView SheetName="Sheet1"></FarPoint:SheetView>
- </Sheets>
- </FarPoint:FpSpread>
- </form>
- </body>
- </html>
复制代码
- protected void Button1_Click(object sender, EventArgs e)
- {
- FpSpread1.Rows.Add(FpSpread1.ActiveSheetView.ActiveRow, 1);
- }
复制代码 |
|