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

  • 相关阅读:
    Python之socket_tcp
    Python之多进程&异步并行
    Qt forever关键字
    Qt程序在XP系统上不能正常运行
    Qt多线程的使用
    QScrollArea
    QtoolButton
    QComboBox
    Qt播放音频文件
    Qt5.9.1编译oracle驱动
  • 原文地址:https://www.cnblogs.com/rgqancy/p/1816308.html
Copyright © 2011-2022 走看看