Delete a line of data in the DataGrid control

xiaoxiao2021-03-06  43

Tied a hidden column, put KEY.

Play a button column, commandname = "delete" with deleteCommand event

Private void xxxgrid_deletecommand (Object Source, DataGridCommandeventAndargs e) {string key = this.xxxgrid.items [E.Item.ItemIndex] .Cells [i] .text; // i is the number you tied to KEY}

转载请注明原文地址:https://www.9cbs.com/read-75083.html

New Post(0)