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(); }