sam 你好
你可以使用 FpSpread1.ActiveSheetView.ResetViewRowIndexes(); 方法来重置数据行的显示顺序。
- public partial class WebForm1 : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- this.FpSpread1.ActiveSheetView.AllowSort = true;
- this.FpSpread1.Sheets[0].Cells[0, 0].Value = 20;
- this.FpSpread1.Sheets[0].Cells[1, 0].Value = 67;
- this.FpSpread1.Sheets[0].Cells[2, 0].Value = 34;
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- FpSpread1.ActiveSheetView.ResetViewRowIndexes();
- }
- }
复制代码 |