dbGrid_mouseClick( objectID );

if( objectID.indexOf( 'dbgrid' ) != -1  )
{
  idx = getDBgrid_index( objectID );
  if(  dbgrid_enabled[ idx ]  )
  {
    dbGrid1_mouseClick( objectID );
  }// End if( dbGrid_enabled[ getButton_index( objectID ) ] )

}// End if( objectID.indexOf( 'dbGrid' ) != -1 )


/**
 *  Funções acrescentada pelo Desenvolvedor
 */

function dbGrid1_mouseClick( objID )
{
  if( objID.indexOf( 'dbgrid1' ) != -1 )
  {
    nrTab = tabControl_selected[0];
//alert( objID);
    switch( nrTab )
    {
      case 1:
        nObj = getDBgrid_ID(objID);
        idx  = getDBgrid_index( nObj );
        keyValue = getDBgrid_key_value( nObj, idx );
        arr = keyValue.split( '#' );
        db_grid = 'dbgrid2';
        key = db_grid + ':' + arr[0];
        dataAccess.getFields( db_grid );
        dataAccess.getResult( key  );
        //alert( nObj+' key:'+key );
        //alert(getDBgrid_col_sum_by_name( "dbgrid2", "custo" ) );
        break;
      case 3:
        nObj = getDBgrid_ID(objID);
        idx  = getDBgrid_index( nObj );
        keyValue = getDBgrid_key_value( nObj, idx );
        arr = keyValue.split( '#' );
        //key = arr[0];
        //alert( key );
        db_grid = 'dbgrid4';
        key = db_grid + ':' + arr[0];
        //alert( key );
        dataAccess.getFields( db_grid );
        dataAccess.getResult( key  );


        //alert('Tab 3');
        cmd = 'dbgrid1:'+key+':descricao:dbEdit1';
        //dataAccess.getField_value( cmd );
        break;
    }// End
  }// End
}// End

