Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在尝试“取消”编辑ListView. 在我使用按钮在后面的代码中触发此命令InsertItemTemplate:ListView
ListView
InsertItemTemplate
ListView.InsertItemPosition = InsertItemPosition.None;
但是,是否EditItemTemplate缺少此属性?
EditItemTemplate
谁能给我至少看的方向?
要取消编辑,您可以使用以下代码:
protected void ListView1_ItemCanceling(object sender, ListViewCancelEventArgs e) { ListView1.EditIndex = -1; ListView1.DataBind(); }