How to determine the checkbox in the DataGrid is selected

xiaoxiao2021-03-06  22

1: WJ2929 (* ヤ rěй ヤ *) () Reputation: 100 Checkbox CB = (Checkbox) DataGrid.Items [line] .Cells [列] .controls [1]; BOOL B = Cb.checked // Here you get 2: Haogmj () () Reputation: 100 Foreach (DataGridItem Item in DataGrid1.items) {CheckBox Chk = (Checkbox) Item.cells [4] .FindControl ("CheckBox1")); if (item.cells [3] .text == "1") {chk.checked = true;}}

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

New Post(0)