【问题标题】:What does GridView1.EditIndex = -1 mean? [closed]GridView1.EditIndex = -1 是什么意思? [关闭]
【发布时间】:2014-12-03 04:31:41
【问题描述】:

我在一个 ASP.NET 项目的OnRowCancelingEdit 事件中找到了以下语句,但我不确定它是什么意思:

GridView1.EditIndex = -1;

【问题讨论】:

  • 是的编辑事件是从.aspx页面的onrowcancelingedit调用的事件。
  • EditIndex is Gets or sets the index of the row to edit. 所以当你没有要编辑的行时你会写 -1 msdn.microsoft.com/en-us/library/…

标签: c# asp.net gridview


【解决方案1】:

文档是一个很好的资源...... MSDN 总是值得一试。

来自GridView.EditIndex

要编辑的行的从零开始的索引。

默认为-1,表示没有行被编辑。 (我的重点)

【讨论】:

  • 哦..谢谢你的回答..
  • 其实这是我在 Stack Exchange 的第一个问题。将来一定会实施您的建议。感谢您的帮助。
猜你喜欢
  • 2010-12-29
  • 2014-09-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-01-24
  • 1970-01-01
  • 2014-04-03
  • 2013-05-16
相关资源
最近更新 更多