Example caller

from the Artful MySQL Tips List


Here is the call to DgvFormJIT made by TheUsualforMySQL, the MySQL-Visual Studio demonstration app described in Chapter 22 of Get It Done with MySQL 5&Up.
    // LOOKUP A COLUMN VALUE IN THE TABLE REFERENCED BY THE FOREIGN KEY
    private void lookupColumnValueDGV( object sender, EventArgs e ) {
      ToolStripItem menuItem = ( ToolStripItem ) sender;
      rowInfo info = ( rowInfo ) menuItem.Tag;
      string[] sColInfo = info.relation;
      DgvFormJIT df = new DgvFormJIT( this,
                                      sConnDb,
                                      sColInfo[PARENT_SCHEMA],
                                      sColInfo[PARENT_TABLE],
                                      sColInfo[PARENT_KEY],
                                      info.dgv.Rows[info.row].Cells[info.relation[CHILD_KEY]].Value.ToString(),
                                      info.rect
                                    );
      if ( df.SelectedValue != "" ) {
        info.dgv.Rows[info.row].Cells[info.relation[CHILD_KEY]].Value = ( object ) df.SelectedValue;
      }
    }




Return to the Artful MySQL Tips page