DgvRowFinder example caller

from the Artful MySQL Tips List


Here is the call to DgvRowFinder made by Visual Studio version of TheUsual for MySQL described in Chapter 22 of Get It Done with MySQL 5&Up:

private void dgv_ColumnHeaderMouseClick( object sender, DataGridViewCellMouseEventArgs e ) {
  if ( e.Button == MouseButtons.Right ) {
    DataGridView dgv = ( DataGridView ) sender;
    DgvRowFinder dgvr = new DgvRowFinder( this, dgv, e.ColumnIndex, e.RowIndex );
    if ( dgvr.RowFound >= 0 ) {
      if ( dgv.Name == "dataGridView1" ) {
        this.iFirstRow = ( int ) dgvr.RowFound;
        GridFill( IMODE_MOVE );
      }
      else {
        this.iDetFirstRow = ( int ) dgvr.RowFound;
        Grid2Refill( 0 );
      }
    }
    else {
      statusMessages.Text = "No matching rows found.";
    }
  }
}


Return to the Artful MySQL Tips page