zoukankan      html  css  js  c++  java
  • dataGridView1实现上一条,下一条,首记录,尾记录按钮

    首记录:this.dataGridView1.CurrentCell = this.dataGridView1[this.dataGridView1.CurrentCell.ColumnIndex, 0];

    上一记录:if (this.dataGridView1.CurrentCell.RowIndex > 0)
                {
                    this.dataGridView1.CurrentCell = this.dataGridView1[this.dataGridView1.CurrentCell.ColumnIndex, this.dataGridView1.CurrentCell.RowIndex - 1];
                }


    下一记录:
    if (this.dataGridView1.CurrentCell.RowIndex < this.dataGridView1.RowCount - 1)
                {
                    this.dataGridView1.CurrentCell = this.dataGridView1[this.dataGridView1.CurrentCell.ColumnIndex, this.dataGridView1.CurrentCell.RowIndex + 1];

                }

    末记录:
    this.dataGridView1.CurrentCell = this.dataGridView1[this.dataGridView1.CurrentCell.ColumnIndex, this.dataGridView1.RowCount - 1];

  • 相关阅读:
    一、Django CBV and Django RestFramework
    Web框架及Django初始化
    HTTP协议
    Mysql之存储引擎
    Django之ORM字段相关
    Django之视图
    Django之初步实现登录功能,APP及ORM
    jQuery
    C#基础:飞行棋游戏
    C#基础练习
  • 原文地址:https://www.cnblogs.com/tuosang/p/2670610.html
Copyright © 2011-2022 走看看