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

  • 相关阅读:
    ssh
    datetime
    网络-sdn(2)
    django-drf
    Vscode前段常用插件
    Vscode离线安装插件
    CSS 实现绘制各种三角形
    flex布局
    js实现全选和取消全选
    购物车用Ajax向后台传参
  • 原文地址:https://www.cnblogs.com/rgqancy/p/1816308.html
Copyright © 2011-2022 走看看