zoukankan      html  css  js  c++  java
  • WPF 遍历 DataGrid 每行的控件

               下面两种语法,只是变相的形式而已。

         for (int i = 0; i < dgETL.Items.Count; i++)
                {
                    CheckBox selectCheckBoxInCell = dgETL.Columns[0].GetCellContent(dgETL.Items[i]) as CheckBox;
                    if (selectCheckBoxInCell != null)
                    {
                        selectCheckBoxInCell.IsChecked = cbxOne.IsChecked;
                    }
                }

                foreach (var item in dgETL.Items)
                {
                    CheckBox selectCheckBoxInCell = dgETL.Columns[0].GetCellContent(item) as CheckBox;
                    if (selectCheckBoxInCell != null)
                    {
                        selectCheckBoxInCell.IsChecked = cbxOne.IsChecked;
                    }
                }

  • 相关阅读:
    简介&目录
    Lucas 定理
    扩展欧几里得算法(exgcd)
    【做题记录】CF23B Party
    【做题记录】CF1375D Replace by MEX
    【做题记录】CF194B Square
    SPFA
    dijkstra
    CSP-J&S 2020 游记
    中国剩余定理(CRT)
  • 原文地址:https://www.cnblogs.com/rgqancy/p/1816308.html
Copyright © 2011-2022 走看看