博客
关于我
datagridview 常用操作代码
阅读量:124 次
发布时间:2019-02-27

本文共 1263 字,大约阅读时间需要 4 分钟。

???????

DataGridView???C#?????????????????????????????????????????????DataGridView?????????????????????DataGridView?????????????

?????????

???DataGridView??????????????????????

  • ??????????

    ??????????DataGridView???????????

    string headText = this.dataGridView1.Columns[this.dataGridView1.CurrentCell.ColumnIndex].HeaderText;

    ???dataGridView1 ?DataGridView??????CurrentCell ?????????????

  • ??????????

    ???????????????????????????

    string name = this.dataGridView1.Columns[this.dataGridView1.CurrentCell.ColumnIndex].Name;
  • ???????

    ???????????DataGridView?????????????

    private void getCurrentCellButton_Click(object sender, System.EventArgs e){    string msg = String.Format("Row: {0}, Column: {1}",        dataGridView1.CurrentCell.RowIndex,        dataGridView1.CurrentCell.ColumnIndex);    MessageBox.Show(msg, "Current Cell");}

    ???????

    ?????????DataGridView??????????????????

    private void setCurrentCellButton_Click(object sender, System.EventArgs e){    // ?????????0??1?    this.dataGridView2.CurrentCell = this.dataGridView1[1, 0];}

    ??DataGridView?CurrentCell??

    DataGridView???CurrentCell ????????????????????????????

    this.dataGridView1.CurrentCell = this.dataGridView1[1, 0];

    ???dataGridView1 ?DataGridView??????1 ??????0 ???????????????????????????

    ??????????????

    转载地址:http://eerf.baihongyu.com/

    你可能感兴趣的文章
    Objective-C实现Exceeding words超词(差距是ascii码的距离) 算法(附完整源码)
    查看>>
    Objective-C实现exchange sort交换排序算法(附完整源码)
    查看>>
    Objective-C实现ExponentialSearch指数搜索算法(附完整源码)
    查看>>
    Objective-C实现extended euclidean algorithm扩展欧几里得算法(附完整源码)
    查看>>
    Objective-C实现ExtendedEuclidean扩展欧几里德GCD算法(附完整源码)
    查看>>
    Objective-C实现external sort外排序算法(附完整源码)
    查看>>
    Objective-C实现Factorial digit sum阶乘数字和算法(附完整源码)
    查看>>
    Objective-C实现factorial iterative阶乘迭代算法(附完整源码)
    查看>>
    Objective-C实现factorial recursive阶乘递归算法(附完整源码)
    查看>>
    Objective-C实现factorial阶乘算法(附完整源码)
    查看>>
    Objective-C实现factorial阶乘算法(附完整源码)
    查看>>
    Objective-C实现Factors因数算法(附完整源码)
    查看>>
    Objective-C实现Farey Approximation近似算法(附完整源码)
    查看>>
    Objective-C实现Fast Powering算法(附完整源码)
    查看>>
    Objective-C实现Fedwick树算法(附完整源码)
    查看>>
    Objective-C实现fenwick tree芬威克树算法(附完整源码)
    查看>>
    Objective-C实现FenwickTree芬威克树算法(附完整源码)
    查看>>
    Objective-C实现fermat little theorem费马小定理算法(附完整源码)
    查看>>
    Objective-C实现FermatPrimalityTest费马素数测试算法(附完整源码)
    查看>>
    Objective-C实现fft2函数功能(附完整源码)
    查看>>