Loading ...
Sorry, an error occurred while loading the content.
 

RE: [JavaScript] Disable grid control

Expand Messages
  • Leonardo Ghigliani
    Yes. That’s true, but I don’t know if there is an easier way, because of links. Looping all children and disabling them implies disabling also any link
    Message 1 of 16 , Sep 29, 2008
      Yes. That’s true, but I don’t know if there is an easier way, because of
      links.

      Looping all children and disabling them implies disabling also any link
      (image, <a> tags, and other form of clickable references) setting, for
      instance, an href=”void(0);”. That means that I should build some stack of
      hrefs to remember the href for each element so it can be “restored” to
      enabled state. Also I should remember the whole style and class to make it
      visibly disabled for the user with another style, and then restore its
      appearance when necessary.

      I thought that, but it’s difficult. The covering div is so easy and I am
      (was) so close to get it working… ;-). I just need that div to follow my
      grid wherever it goes as if it were an annoying fly ;-)

      If it is impossible, I’ll take hands on this element crawler with the states
      stack.

      I tried to post the code but it is a bit large.

      In short terms my control renders nested divs.

      One whole containing div to make possible replacing new contents by an ajax
      function (for instance, for paging).

      Then comes a Div for header (columns headers) and two nested divs, one for
      containing data and onother that contains that div (scrollable). That way y
      can scroll data area leaving fixed headers and footer.

      Last there is a footer div for paging controls and information.

      I place some divs over header div, data div, and footer div, so I’ts
      possible to scroll data but not to click any control / links appearing
      inside nor any control in header (may appear an “add new” button).

      That is working ok, except if the grid moves it’s position.



      Thanks

      Leonardo



      <div id="DivDNGrid_grdLocalidades" class="DNGrid_DivContenedor"
      style="width: 560px">



      <script type="text/javascript">

      var grdLocalidades_PaginaActual = 1;

      var grdLocalidades_Orden = 'Localidad_Nombre';

      var grdLocalidades_OrdenTipo = 0;

      var grdLocalidades_Parametros = "";

      var grdLocalidades_ParametrosAdicionales = '';

      var grdLocalidades_ModoSeleccion = 'SinSeleccion';

      var grdLocalidades_ModoSeleccionMouseOver = 'SinSeleccion';

      </script>



      <input type="hidden" name="grdLocalidades_ParametrosMetodo" value=""
      />

      <table cellspacing="0" cellpadding="0" border="0">

      <tr>

      <td style="text-align: left;">

      <div id="DNGrid_DivEncabezado_grdLocalidades">

      <div id="grdLocalidades_ROW_0_COL_0" style="width:
      0px; display: none; visibility: hidden;">

      Id</div>



      <table id="DNGrid_TablaEncabezado_grdLocalidades"
      class="DNGrid_TablaEncabezado"

      cellspacing="0" cellpadding="0" width="560px">



      <tr id="grdLocalidades_ROW_0"
      class="DNGrid_FilaEncabezado">

      <td id="grdLocalidades_ROW_0_COL_1"
      class="DNGrid_CeldaEncabezado" align="left" width="230px"

      style="border-left-style: none;
      border-top-style: none; border-right-style: none;

      border-bottom-style: none; border-width:
      1px;">

      <a class="DNGrid_LinkOrden"
      href="javascript:CambiarOrdenGrilla('grdLocalidades', 'Localidad_nombre',
      1)"

      onmouseover="window.status='Cambiar
      orden'; return true;" onmouseout="window.status=''; return true;">

      Localidad</a><div
      id="DNGrid_DivIndicadorOrden_ASC">

       </div>

      </td>

      <td id="grdLocalidades_ROW_0_COL_2"
      class="DNGrid_CeldaEncabezado" align="left" width="250px"

      style="border-left-style: none;
      border-top-style: none; border-right-style: none;

      border-bottom-style: none; border-width:
      1px;">

      <a class="DNGrid_LinkOrden"
      href="javascript:CambiarOrdenGrilla('grdLocalidades',
      'Localidad_Pais_Nombre', 0)"

      onmouseover="window.status='Cambiar
      orden'; return true;" onmouseout="window.status=''; return true;">

      Pais</a><div
      id="DNGrid_DivIndicadorOrden_VACIO">

      </div>

      </td>

      <td id="grdLocalidades_ROW_0_COL_3"
      class="DNGrid_CeldaEncabezado" align="center"

      width="70px" style="border-left-style:
      none; border-top-style: none; border-right-style: none;

      border-bottom-style: none; border-width:
      1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=ALTA',
      mAlto, mAncho, 'onRetorno_Nuevo()');void(0);">

      <span style="color: white;
      text-decoration: none;">Nuevo  <img alt="Nueva subsección"


      src="/RentaMaxis.Vista/Imagenes/GridImgNuevo.gif" class="DNGrid_ImgEdicion"
      /></span></a></td>

      </tr>

      </table>

      </div>



      <div id="DNGrid_DivDatos_grdLocalidades"
      class="DNGrid_DivDatos" style="width: 577px;

      height: 210px">



      <div id="DNGrid_DivMarcoDatos_grdLocalidades"
      class="DNGrid_DivMarcoDatos" style="width: 560px;

      height: 210px">



      <div id="grdLocalidades_ROW_1_COL_0"
      style="width: 0px; display: none; visibility: hidden;">

      8</div>

      <div id="grdLocalidades_ROW_2_COL_0"
      style="width: 0px; display: none; visibility: hidden;">

      1</div>

      <div id="grdLocalidades_ROW_3_COL_0"
      style="width: 0px; display: none; visibility: hidden;">

      9</div>

      <div id="grdLocalidades_ROW_4_COL_0"
      style="width: 0px; display: none; visibility: hidden;">

      6</div>

      <div id="grdLocalidades_ROW_5_COL_0"
      style="width: 0px; display: none; visibility: hidden;">

      3</div>

      <div id="grdLocalidades_ROW_6_COL_0"
      style="width: 0px; display: none; visibility: hidden;">

      5</div>

      <div id="grdLocalidades_ROW_7_COL_0"
      style="width: 0px; display: none; visibility: hidden;">

      10</div>

      <table class="DNGrid_TablaDatos" width="558px"
      cellpadding="0" cellspacing="0" border="0">

      <tr class="DNGrid_FilaDatos"
      id="grdLocalidades_ROW_1" onmouseover="DNGrid_OnMouseOverRow(this.id)"


      onmouseout="DNGrid_OnMouseOutRow(this.id)">

      <td id="grdLocalidades_ROW_1_COL_1"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="230px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Boston</td>

      <td id="grdLocalidades_ROW_1_COL_2"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="250px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      United States</td>

      <td id="grdLocalidades_ROW_1_COL_3"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="center" width="70px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
      ION&Localidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Editar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
      alidad_Id=8', mAlto, mAncho, 'void(0)');void(0);">

      <img alt="Ver"
      src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
      lidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Eliminar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
      class="DNGrid_ImgEdicion" /></a></td>

      </tr>

      <tr class="DNGrid_FilaDatosAlt"
      id="grdLocalidades_ROW_2" onmouseover="DNGrid_OnMouseOverRow(this.id)"


      onmouseout="DNGrid_OnMouseOutRow(this.id)">

      <td id="grdLocalidades_ROW_2_COL_1"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="230px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Buenos Aires</td>

      <td id="grdLocalidades_ROW_2_COL_2"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="250px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Argentina</td>

      <td id="grdLocalidades_ROW_2_COL_3"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="center" width="70px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
      ION&Localidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Editar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
      alidad_Id=1', mAlto, mAncho, 'void(0)');void(0);">

      <img alt="Ver"
      src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
      lidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Eliminar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
      class="DNGrid_ImgEdicion" /></a></td>

      </tr>

      <tr class="DNGrid_FilaDatos"
      id="grdLocalidades_ROW_3" onmouseover="DNGrid_OnMouseOverRow(this.id)"


      onmouseout="DNGrid_OnMouseOutRow(this.id)">

      <td id="grdLocalidades_ROW_3_COL_1"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="230px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Delta - Tigre</td>

      <td id="grdLocalidades_ROW_3_COL_2"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="250px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Argentina</td>

      <td id="grdLocalidades_ROW_3_COL_3"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="center" width="70px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
      ION&Localidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Editar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
      alidad_Id=9', mAlto, mAncho, 'void(0)');void(0);">

      <img alt="Ver"
      src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
      lidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Eliminar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
      class="DNGrid_ImgEdicion" /></a></td>

      </tr>

      <tr class="DNGrid_FilaDatosAlt"
      id="grdLocalidades_ROW_4" onmouseover="DNGrid_OnMouseOverRow(this.id)"


      onmouseout="DNGrid_OnMouseOutRow(this.id)">

      <td id="grdLocalidades_ROW_4_COL_1"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="230px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Miami</td>

      <td id="grdLocalidades_ROW_4_COL_2"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="250px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      United States</td>

      <td id="grdLocalidades_ROW_4_COL_3"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="center" width="70px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
      ION&Localidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Editar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
      alidad_Id=6', mAlto, mAncho, 'void(0)');void(0);">

      <img alt="Ver"
      src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
      lidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Eliminar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
      class="DNGrid_ImgEdicion" /></a></td>

      </tr>

      <tr class="DNGrid_FilaDatos"
      id="grdLocalidades_ROW_5" onmouseover="DNGrid_OnMouseOverRow(this.id)"


      onmouseout="DNGrid_OnMouseOutRow(this.id)">

      <td id="grdLocalidades_ROW_5_COL_1"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="230px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      New York</td>

      <td id="grdLocalidades_ROW_5_COL_2"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="250px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      United States</td>

      <td id="grdLocalidades_ROW_5_COL_3"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="center" width="70px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
      ION&Localidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Editar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
      alidad_Id=3', mAlto, mAncho, 'void(0)');void(0);">

      <img alt="Ver"
      src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
      lidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Eliminar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
      class="DNGrid_ImgEdicion" /></a></td>

      </tr>

      <tr class="DNGrid_FilaDatosAlt"
      id="grdLocalidades_ROW_6" onmouseover="DNGrid_OnMouseOverRow(this.id)"


      onmouseout="DNGrid_OnMouseOutRow(this.id)">

      <td id="grdLocalidades_ROW_6_COL_1"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="230px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Rosario</td>

      <td id="grdLocalidades_ROW_6_COL_2"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="250px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Argentina</td>

      <td id="grdLocalidades_ROW_6_COL_3"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="center" width="70px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
      ION&Localidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Editar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
      alidad_Id=5', mAlto, mAncho, 'void(0)');void(0);">

      <img alt="Ver"
      src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
      lidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Eliminar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
      class="DNGrid_ImgEdicion" /></a></td>

      </tr>

      <tr class="DNGrid_FilaDatos"
      id="grdLocalidades_ROW_7" onmouseover="DNGrid_OnMouseOverRow(this.id)"


      onmouseout="DNGrid_OnMouseOutRow(this.id)">

      <td id="grdLocalidades_ROW_7_COL_1"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="230px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      San Martín de los Andes</td>

      <td id="grdLocalidades_ROW_7_COL_2"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="left" width="250px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      Argentina</td>

      <td id="grdLocalidades_ROW_7_COL_3"
      class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"


      onmouseout="DNGrid_OnMouseOutCelda(this.id)"
      onclick="DNGrid_OnClickCelda(this.id)"

      align="center" width="70px"
      style="border-left-style: none; border-right-style: none;

      border-top-style: none;
      border-bottom: solid 1px; border-width: 1px;">

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
      ION&Localidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Editar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
      alidad_Id=10', mAlto, mAncho, 'void(0)');void(0);">

      <img alt="Ver"
      src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
      /></a>

      <a
      href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
      lidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

      <img alt="Eliminar"
      src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
      class="DNGrid_ImgEdicion" /></a></td>

      </tr>

      </table>

      </div>

      </div>



      <div id="DNGrid_DivFooter_grdLocalidades" style="width:
      560px;">

      <table class="DNGrid_TablaPaginado" cellpadding="0"
      cellspacing="0" width="560px">

      <tr class="DNGrid_FilaPaginado">

      <td rowspan="4" align="Center">

      <table border="0" cellpadding="2"
      cellspacing="0" align="center">

      <tr>

      <td width="20">

      <img alt=""
      src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Primero_Dis.gif"
      class="DNGrid_Paginado_Botones" /></td>

      <td width="20">

      <img alt=""
      src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Anterior_Dis.gif"
      class="DNGrid_Paginado_Botones" /></td>

      <td
      class="DNGrid_TextoPaginado">

      # 1 / 1</td>

      <td width="20">

      <img alt=""
      src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Siguiente_Dis.gif"
      class="DNGrid_Paginado_Botones" /></td>

      <td width="20">

      <img alt=""
      src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Ultimo_Dis.gif"
      class="DNGrid_Paginado_Botones" /></td>

      </tr>

      </table>

      </td>

      </tr>

      </table>

      </div>

      <table class="DNGrid_TablaPie" cellspacing="0"
      width="560px">

      <tr class="DNGrid_FilaPie">

      <td rowspan="4">

      </td>

      </tr>

      </table>

      </td>

      </tr>

      </table>



      <div id="imagenEsperaDNGrid_grdLocalidades"
      class="DNGrid_DivImagenEspera">

      <img src="/RentaMaxis.Vista/Imagenes/esperaCallback.gif"
      /></div>



      <div id="DNGrid_DivReadOnlyDatos_grdLocalidades"
      class="DNGrid_DivDatosReadOnly">

      </div>

      <div id="DNGrid_DivReadOnlyHeader_grdLocalidades"
      class="DNGrid_DivHeaderReadOnly">

      </div>

      <div id="DNGrid_DivReadOnlyFooter_grdLocalidades"
      class="DNGrid_DivFooterReadOnly">

      </div>

      </div>





      _____

      De: Alligator [mailto:alligator_666@...]
      Enviado el: jueves, 25 de septiembre de 2008 10:46
      Para: JavaScript_Official@yahoogroups.com
      Asunto: Re: [JavaScript] Disable grid control



      * Replies will be sent through Spamex to JavaScript_Official@yahoogroups.com

      * For additional info click -> www.spamex.com/i/?v=18971168





      Do you mean, you are using something like:
      <div id='myDiv'>
      <asp:datagrid>
      <!-- stuff here -->
      </asp:datagrid>
      </div>

      If that's the case then you just need to get a reference to 'myDiv' and loop
      all children elements disabling all input, textareas and selects. It would
      be way easier if you are using jQuery.
      Anyway, to be sure, could you post the portion of your html that you are
      using, so we can provide a more accurate advise?

      Thanks

      Alligator_666

      Leonardo Ghigliani <yahoogroups@ <mailto:yahoogroups%40spamex.com>
      spamex.com> wrote: Hi. I use a custom self made grid control in an ASP.NET
      application. It is
      based in a table running inside a div (to make it scrollable with overflow)

      I need to be able to disable it from client side. Which would be the best
      approach?

      In an earlier post I asked how to cover it with a div (I am doing that but I
      have a problem when the grid changes it's absolute position. Read old posts
      from 8/22 and 9/4)

      Anyway, any other approach will be appreciated.

      Inside the grid cells may appear images, text (which is not so important to
      disable) but also links, buttons, and other controls/interaction artifacts.

      It is also necessary to keep the ability to restore it back to enabled
      state.

      Thanks.

      [Non-text portions of this message have been removed]





      [Non-text portions of this message have been removed]





      [Non-text portions of this message have been removed]
    • Alligator
      The Covering Div approach might be a good solution, just that in order to get it to work properly, you need to attach events to the resize and scroll events in
      Message 2 of 16 , Oct 2, 2008
        The Covering Div approach might be a good solution, just that in order to get it to work properly, you need to attach events to the resize and scroll events in order to adjust it's position accordingly.
        On the other side... disabling each link might be such a big deal if you can temporary move the href contents to a custom attribute on disabling and then move them back on enabling.
        If you are using jQuery this could be achieved with something like this:

        $('#DisableButton').click(function() {
        $('#DivDNGrid_grdLocalidades a').each( function() {
        this.customAttr = this.href;
        this.href = 'javascript:void(0)';
        })
        });


        Alligator_666


        Leonardo Ghigliani <yahoogroups@...> wrote: Yes. That’s true, but I don’t know if there is an easier way, because of
        links.

        Looping all children and disabling them implies disabling also any link
        (image, <a> tags, and other form of clickable references) setting, for
        instance, an href=”void(0);”. That means that I should build some stack of
        hrefs to remember the href for each element so it can be “restored” to
        enabled state. Also I should remember the whole style and class to make it
        visibly disabled for the user with another style, and then restore its
        appearance when necessary.

        I thought that, but it’s difficult. The covering div is so easy and I am
        (was) so close to get it working… ;-). I just need that div to follow my
        grid wherever it goes as if it were an annoying fly ;-)

        If it is impossible, I’ll take hands on this element crawler with the states
        stack.

        I tried to post the code but it is a bit large.

        In short terms my control renders nested divs.

        One whole containing div to make possible replacing new contents by an ajax
        function (for instance, for paging).

        Then comes a Div for header (columns headers) and two nested divs, one for
        containing data and onother that contains that div (scrollable). That way y
        can scroll data area leaving fixed headers and footer.

        Last there is a footer div for paging controls and information.

        I place some divs over header div, data div, and footer div, so I’ts
        possible to scroll data but not to click any control / links appearing
        inside nor any control in header (may appear an “add new” button).

        That is working ok, except if the grid moves it’s position.

        Thanks

        Leonardo

        <div id="DivDNGrid_grdLocalidades" class="DNGrid_DivContenedor"
        style="width: 560px">

        <script type="text/javascript">

        var grdLocalidades_PaginaActual = 1;

        var grdLocalidades_Orden = 'Localidad_Nombre';

        var grdLocalidades_OrdenTipo = 0;

        var grdLocalidades_Parametros = "";

        var grdLocalidades_ParametrosAdicionales = '';

        var grdLocalidades_ModoSeleccion = 'SinSeleccion';

        var grdLocalidades_ModoSeleccionMouseOver = 'SinSeleccion';

        </script>

        <input type="hidden" name="grdLocalidades_ParametrosMetodo" value=""
        />

        <table cellspacing="0" cellpadding="0" border="0">

        <tr>

        <td style="text-align: left;">

        <div id="DNGrid_DivEncabezado_grdLocalidades">

        <div id="grdLocalidades_ROW_0_COL_0" style="width:
        0px; display: none; visibility: hidden;">

        Id</div>

        <table id="DNGrid_TablaEncabezado_grdLocalidades"
        class="DNGrid_TablaEncabezado"

        cellspacing="0" cellpadding="0" width="560px">

        <tr id="grdLocalidades_ROW_0"
        class="DNGrid_FilaEncabezado">

        <td id="grdLocalidades_ROW_0_COL_1"
        class="DNGrid_CeldaEncabezado" align="left" width="230px"

        style="border-left-style: none;
        border-top-style: none; border-right-style: none;

        border-bottom-style: none; border-width:
        1px;">

        <a class="DNGrid_LinkOrden"
        href="javascript:CambiarOrdenGrilla('grdLocalidades', 'Localidad_nombre',
        1)"

        onmouseover="window.status='Cambiar
        orden'; return true;" onmouseout="window.status=''; return true;">

        Localidad</a><div
        id="DNGrid_DivIndicadorOrden_ASC">

         </div>

        </td>

        <td id="grdLocalidades_ROW_0_COL_2"
        class="DNGrid_CeldaEncabezado" align="left" width="250px"

        style="border-left-style: none;
        border-top-style: none; border-right-style: none;

        border-bottom-style: none; border-width:
        1px;">

        <a class="DNGrid_LinkOrden"
        href="javascript:CambiarOrdenGrilla('grdLocalidades',
        'Localidad_Pais_Nombre', 0)"

        onmouseover="window.status='Cambiar
        orden'; return true;" onmouseout="window.status=''; return true;">

        Pais</a><div
        id="DNGrid_DivIndicadorOrden_VACIO">

        </div>

        </td>

        <td id="grdLocalidades_ROW_0_COL_3"
        class="DNGrid_CeldaEncabezado" align="center"

        width="70px" style="border-left-style:
        none; border-top-style: none; border-right-style: none;

        border-bottom-style: none; border-width:
        1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=ALTA',
        mAlto, mAncho, 'onRetorno_Nuevo()');void(0);">

        <span style="color: white;
        text-decoration: none;">Nuevo  <img alt="Nueva subsección"

        src="/RentaMaxis.Vista/Imagenes/GridImgNuevo.gif" class="DNGrid_ImgEdicion"
        /></span></a></td>

        </tr>

        </table>

        </div>

        <div id="DNGrid_DivDatos_grdLocalidades"
        class="DNGrid_DivDatos" style="width: 577px;

        height: 210px">

        <div id="DNGrid_DivMarcoDatos_grdLocalidades"
        class="DNGrid_DivMarcoDatos" style="width: 560px;

        height: 210px">

        <div id="grdLocalidades_ROW_1_COL_0"
        style="width: 0px; display: none; visibility: hidden;">

        8</div>

        <div id="grdLocalidades_ROW_2_COL_0"
        style="width: 0px; display: none; visibility: hidden;">

        1</div>

        <div id="grdLocalidades_ROW_3_COL_0"
        style="width: 0px; display: none; visibility: hidden;">

        9</div>

        <div id="grdLocalidades_ROW_4_COL_0"
        style="width: 0px; display: none; visibility: hidden;">

        6</div>

        <div id="grdLocalidades_ROW_5_COL_0"
        style="width: 0px; display: none; visibility: hidden;">

        3</div>

        <div id="grdLocalidades_ROW_6_COL_0"
        style="width: 0px; display: none; visibility: hidden;">

        5</div>

        <div id="grdLocalidades_ROW_7_COL_0"
        style="width: 0px; display: none; visibility: hidden;">

        10</div>

        <table class="DNGrid_TablaDatos" width="558px"
        cellpadding="0" cellspacing="0" border="0">

        <tr class="DNGrid_FilaDatos"
        id="grdLocalidades_ROW_1" onmouseover="DNGrid_OnMouseOverRow(this.id)"

        onmouseout="DNGrid_OnMouseOutRow(this.id)">

        <td id="grdLocalidades_ROW_1_COL_1"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="230px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Boston</td>

        <td id="grdLocalidades_ROW_1_COL_2"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="250px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        United States</td>

        <td id="grdLocalidades_ROW_1_COL_3"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="center" width="70px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
        ION&Localidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Editar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
        alidad_Id=8', mAlto, mAncho, 'void(0)');void(0);">

        <img alt="Ver"
        src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
        lidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Eliminar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
        class="DNGrid_ImgEdicion" /></a></td>

        </tr>

        <tr class="DNGrid_FilaDatosAlt"
        id="grdLocalidades_ROW_2" onmouseover="DNGrid_OnMouseOverRow(this.id)"

        onmouseout="DNGrid_OnMouseOutRow(this.id)">

        <td id="grdLocalidades_ROW_2_COL_1"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="230px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Buenos Aires</td>

        <td id="grdLocalidades_ROW_2_COL_2"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="250px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Argentina</td>

        <td id="grdLocalidades_ROW_2_COL_3"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="center" width="70px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
        ION&Localidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Editar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
        alidad_Id=1', mAlto, mAncho, 'void(0)');void(0);">

        <img alt="Ver"
        src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
        lidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Eliminar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
        class="DNGrid_ImgEdicion" /></a></td>

        </tr>

        <tr class="DNGrid_FilaDatos"
        id="grdLocalidades_ROW_3" onmouseover="DNGrid_OnMouseOverRow(this.id)"

        onmouseout="DNGrid_OnMouseOutRow(this.id)">

        <td id="grdLocalidades_ROW_3_COL_1"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="230px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Delta - Tigre</td>

        <td id="grdLocalidades_ROW_3_COL_2"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="250px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Argentina</td>

        <td id="grdLocalidades_ROW_3_COL_3"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="center" width="70px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
        ION&Localidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Editar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
        alidad_Id=9', mAlto, mAncho, 'void(0)');void(0);">

        <img alt="Ver"
        src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
        lidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Eliminar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
        class="DNGrid_ImgEdicion" /></a></td>

        </tr>

        <tr class="DNGrid_FilaDatosAlt"
        id="grdLocalidades_ROW_4" onmouseover="DNGrid_OnMouseOverRow(this.id)"

        onmouseout="DNGrid_OnMouseOutRow(this.id)">

        <td id="grdLocalidades_ROW_4_COL_1"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="230px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Miami</td>

        <td id="grdLocalidades_ROW_4_COL_2"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="250px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        United States</td>

        <td id="grdLocalidades_ROW_4_COL_3"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="center" width="70px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
        ION&Localidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Editar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
        alidad_Id=6', mAlto, mAncho, 'void(0)');void(0);">

        <img alt="Ver"
        src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
        lidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Eliminar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
        class="DNGrid_ImgEdicion" /></a></td>

        </tr>

        <tr class="DNGrid_FilaDatos"
        id="grdLocalidades_ROW_5" onmouseover="DNGrid_OnMouseOverRow(this.id)"

        onmouseout="DNGrid_OnMouseOutRow(this.id)">

        <td id="grdLocalidades_ROW_5_COL_1"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="230px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        New York</td>

        <td id="grdLocalidades_ROW_5_COL_2"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="250px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        United States</td>

        <td id="grdLocalidades_ROW_5_COL_3"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="center" width="70px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
        ION&Localidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Editar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
        alidad_Id=3', mAlto, mAncho, 'void(0)');void(0);">

        <img alt="Ver"
        src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
        lidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Eliminar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
        class="DNGrid_ImgEdicion" /></a></td>

        </tr>

        <tr class="DNGrid_FilaDatosAlt"
        id="grdLocalidades_ROW_6" onmouseover="DNGrid_OnMouseOverRow(this.id)"

        onmouseout="DNGrid_OnMouseOutRow(this.id)">

        <td id="grdLocalidades_ROW_6_COL_1"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="230px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Rosario</td>

        <td id="grdLocalidades_ROW_6_COL_2"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="250px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Argentina</td>

        <td id="grdLocalidades_ROW_6_COL_3"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="center" width="70px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
        ION&Localidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Editar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
        alidad_Id=5', mAlto, mAncho, 'void(0)');void(0);">

        <img alt="Ver"
        src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
        lidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Eliminar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
        class="DNGrid_ImgEdicion" /></a></td>

        </tr>

        <tr class="DNGrid_FilaDatos"
        id="grdLocalidades_ROW_7" onmouseover="DNGrid_OnMouseOverRow(this.id)"

        onmouseout="DNGrid_OnMouseOutRow(this.id)">

        <td id="grdLocalidades_ROW_7_COL_1"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="230px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        San Martín de los Andes</td>

        <td id="grdLocalidades_ROW_7_COL_2"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="left" width="250px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        Argentina</td>

        <td id="grdLocalidades_ROW_7_COL_3"
        class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

        onmouseout="DNGrid_OnMouseOutCelda(this.id)"
        onclick="DNGrid_OnClickCelda(this.id)"

        align="center" width="70px"
        style="border-left-style: none; border-right-style: none;

        border-top-style: none;
        border-bottom: solid 1px; border-width: 1px;">

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
        ION&Localidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Editar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
        alidad_Id=10', mAlto, mAncho, 'void(0)');void(0);">

        <img alt="Ver"
        src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
        /></a>

        <a
        href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
        lidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

        <img alt="Eliminar"
        src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
        class="DNGrid_ImgEdicion" /></a></td>

        </tr>

        </table>

        </div>

        </div>

        <div id="DNGrid_DivFooter_grdLocalidades" style="width:
        560px;">

        <table class="DNGrid_TablaPaginado" cellpadding="0"
        cellspacing="0" width="560px">

        <tr class="DNGrid_FilaPaginado">

        <td rowspan="4" align="Center">

        <table border="0" cellpadding="2"
        cellspacing="0" align="center">

        <tr>

        <td width="20">

        <img alt=""
        src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Primero_Dis.gif"
        class="DNGrid_Paginado_Botones" /></td>

        <td width="20">

        <img alt=""
        src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Anterior_Dis.gif"
        class="DNGrid_Paginado_Botones" /></td>

        <td
        class="DNGrid_TextoPaginado">

        # 1 / 1</td>

        <td width="20">

        <img alt=""
        src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Siguiente_Dis.gif"
        class="DNGrid_Paginado_Botones" /></td>

        <td width="20">

        <img alt=""
        src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Ultimo_Dis.gif"
        class="DNGrid_Paginado_Botones" /></td>

        </tr>

        </table>

        </td>

        </tr>

        </table>

        </div>

        <table class="DNGrid_TablaPie" cellspacing="0"
        width="560px">

        <tr class="DNGrid_FilaPie">

        <td rowspan="4">

        </td>

        </tr>

        </table>

        </td>

        </tr>

        </table>

        <div id="imagenEsperaDNGrid_grdLocalidades"
        class="DNGrid_DivImagenEspera">

        <img src="/RentaMaxis.Vista/Imagenes/esperaCallback.gif"
        /></div>

        <div id="DNGrid_DivReadOnlyDatos_grdLocalidades"
        class="DNGrid_DivDatosReadOnly">

        </div>

        <div id="DNGrid_DivReadOnlyHeader_grdLocalidades"
        class="DNGrid_DivHeaderReadOnly">

        </div>

        <div id="DNGrid_DivReadOnlyFooter_grdLocalidades"
        class="DNGrid_DivFooterReadOnly">

        </div>

        </div>

        _____

        De: Alligator [mailto:alligator_666@...]
        Enviado el: jueves, 25 de septiembre de 2008 10:46
        Para: JavaScript_Official@yahoogroups.com
        Asunto: Re: [JavaScript] Disable grid control

        * Replies will be sent through Spamex to JavaScript_Official@yahoogroups.com

        * For additional info click -> www.spamex.com/i/?v=18971168

        Do you mean, you are using something like:
        <div id='myDiv'>
        <asp:datagrid>
        <!-- stuff here -->
        </asp:datagrid>
        </div>

        If that's the case then you just need to get a reference to 'myDiv' and loop
        all children elements disabling all input, textareas and selects. It would
        be way easier if you are using jQuery.
        Anyway, to be sure, could you post the portion of your html that you are
        using, so we can provide a more accurate advise?

        Thanks

        Alligator_666

        Leonardo Ghigliani <yahoogroups@ <mailto:yahoogroups%40spamex.com>
        spamex.com> wrote: Hi. I use a custom self made grid control in an ASP.NET
        application. It is
        based in a table running inside a div (to make it scrollable with overflow)

        I need to be able to disable it from client side. Which would be the best
        approach?

        In an earlier post I asked how to cover it with a div (I am doing that but I
        have a problem when the grid changes it's absolute position. Read old posts
        from 8/22 and 9/4)

        Anyway, any other approach will be appreciated.

        Inside the grid cells may appear images, text (which is not so important to
        disable) but also links, buttons, and other controls/interaction artifacts.

        It is also necessary to keep the ability to restore it back to enabled
        state.

        Thanks.

        [Non-text portions of this message have been removed]

        [Non-text portions of this message have been removed]

        [Non-text portions of this message have been removed]







        [Non-text portions of this message have been removed]
      • Leonardo Ghigliani
        Nice! I’m not using jQuery but I can imagine that script using straight DOM. The other approach: Where should I attach the resize and scroll events? To the
        Message 3 of 16 , Oct 2, 2008
          Nice!

          I’m not using jQuery but I can imagine that script using straight DOM.



          The other approach: Where should I attach the resize and scroll events? To
          the window? To the containing div?



          Thanks!

          Leonardo



          _____

          De: Alligator [mailto:alligator_666@...]
          Enviado el: jueves, 02 de octubre de 2008 12:48
          Para: JavaScript_Official@yahoogroups.com
          Asunto: RE: [JavaScript] Disable grid control



          * Replies will be sent through Spamex to JavaScript_Official@yahoogroups.com

          * For additional info click -> www.spamex.com/i/?v=18971168





          The Covering Div approach might be a good solution, just that in order to
          get it to work properly, you need to attach events to the resize and scroll
          events in order to adjust it's position accordingly.
          On the other side... disabling each link might be such a big deal if you can
          temporary move the href contents to a custom attribute on disabling and then
          move them back on enabling.
          If you are using jQuery this could be achieved with something like this:

          $('#DisableButton').click(function() {
          $('#DivDNGrid_grdLocalidades a').each( function() {
          this.customAttr = this.href;
          this.href = 'javascript:void(0)';
          })
          });

          Alligator_666

          Leonardo Ghigliani <yahoogroups@ <mailto:yahoogroups%40spamex.com>
          spamex.com> wrote: Yes. That’s true, but I don’t know if there is an easier
          way, because of
          links.

          Looping all children and disabling them implies disabling also any link
          (image, <a> tags, and other form of clickable references) setting, for
          instance, an href=”void(0);”. That means that I should build some stack of
          hrefs to remember the href for each element so it can be “restored” to
          enabled state. Also I should remember the whole style and class to make it
          visibly disabled for the user with another style, and then restore its
          appearance when necessary.

          I thought that, but it’s difficult. The covering div is so easy and I am
          (was) so close to get it working… ;-). I just need that div to follow my
          grid wherever it goes as if it were an annoying fly ;-)

          If it is impossible, I’ll take hands on this element crawler with the states
          stack.

          I tried to post the code but it is a bit large.

          In short terms my control renders nested divs.

          One whole containing div to make possible replacing new contents by an ajax
          function (for instance, for paging).

          Then comes a Div for header (columns headers) and two nested divs, one for
          containing data and onother that contains that div (scrollable). That way y
          can scroll data area leaving fixed headers and footer.

          Last there is a footer div for paging controls and information.

          I place some divs over header div, data div, and footer div, so I’ts
          possible to scroll data but not to click any control / links appearing
          inside nor any control in header (may appear an “add new” button).

          That is working ok, except if the grid moves it’s position.

          Thanks

          Leonardo

          <div id="DivDNGrid_grdLocalidades" class="DNGrid_DivContenedor"
          style="width: 560px">

          <script type="text/javascript">

          var grdLocalidades_PaginaActual = 1;

          var grdLocalidades_Orden = 'Localidad_Nombre';

          var grdLocalidades_OrdenTipo = 0;

          var grdLocalidades_Parametros = "";

          var grdLocalidades_ParametrosAdicionales = '';

          var grdLocalidades_ModoSeleccion = 'SinSeleccion';

          var grdLocalidades_ModoSeleccionMouseOver = 'SinSeleccion';

          </script>

          <input type="hidden" name="grdLocalidades_ParametrosMetodo" value=""
          />

          <table cellspacing="0" cellpadding="0" border="0">

          <tr>

          <td style="text-align: left;">

          <div id="DNGrid_DivEncabezado_grdLocalidades">

          <div id="grdLocalidades_ROW_0_COL_0" style="width:
          0px; display: none; visibility: hidden;">

          Id</div>

          <table id="DNGrid_TablaEncabezado_grdLocalidades"
          class="DNGrid_TablaEncabezado"

          cellspacing="0" cellpadding="0" width="560px">

          <tr id="grdLocalidades_ROW_0"
          class="DNGrid_FilaEncabezado">

          <td id="grdLocalidades_ROW_0_COL_1"
          class="DNGrid_CeldaEncabezado" align="left" width="230px"

          style="border-left-style: none;
          border-top-style: none; border-right-style: none;

          border-bottom-style: none; border-width:
          1px;">

          <a class="DNGrid_LinkOrden"
          href="javascript:CambiarOrdenGrilla('grdLocalidades', 'Localidad_nombre',
          1)"

          onmouseover="window.status='Cambiar
          orden'; return true;" onmouseout="window.status=''; return true;">

          Localidad</a><div
          id="DNGrid_DivIndicadorOrden_ASC">

           </div>

          </td>

          <td id="grdLocalidades_ROW_0_COL_2"
          class="DNGrid_CeldaEncabezado" align="left" width="250px"

          style="border-left-style: none;
          border-top-style: none; border-right-style: none;

          border-bottom-style: none; border-width:
          1px;">

          <a class="DNGrid_LinkOrden"
          href="javascript:CambiarOrdenGrilla('grdLocalidades',
          'Localidad_Pais_Nombre', 0)"

          onmouseover="window.status='Cambiar
          orden'; return true;" onmouseout="window.status=''; return true;">

          Pais</a><div
          id="DNGrid_DivIndicadorOrden_VACIO">

          </div>

          </td>

          <td id="grdLocalidades_ROW_0_COL_3"
          class="DNGrid_CeldaEncabezado" align="center"

          width="70px" style="border-left-style:
          none; border-top-style: none; border-right-style: none;

          border-bottom-style: none; border-width:
          1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=ALTA',
          mAlto, mAncho, 'onRetorno_Nuevo()');void(0);">

          <span style="color: white;
          text-decoration: none;">Nuevo  <img alt="Nueva subsección"

          src="/RentaMaxis.Vista/Imagenes/GridImgNuevo.gif" class="DNGrid_ImgEdicion"
          /></span></a></td>

          </tr>

          </table>

          </div>

          <div id="DNGrid_DivDatos_grdLocalidades"
          class="DNGrid_DivDatos" style="width: 577px;

          height: 210px">

          <div id="DNGrid_DivMarcoDatos_grdLocalidades"
          class="DNGrid_DivMarcoDatos" style="width: 560px;

          height: 210px">

          <div id="grdLocalidades_ROW_1_COL_0"
          style="width: 0px; display: none; visibility: hidden;">

          8</div>

          <div id="grdLocalidades_ROW_2_COL_0"
          style="width: 0px; display: none; visibility: hidden;">

          1</div>

          <div id="grdLocalidades_ROW_3_COL_0"
          style="width: 0px; display: none; visibility: hidden;">

          9</div>

          <div id="grdLocalidades_ROW_4_COL_0"
          style="width: 0px; display: none; visibility: hidden;">

          6</div>

          <div id="grdLocalidades_ROW_5_COL_0"
          style="width: 0px; display: none; visibility: hidden;">

          3</div>

          <div id="grdLocalidades_ROW_6_COL_0"
          style="width: 0px; display: none; visibility: hidden;">

          5</div>

          <div id="grdLocalidades_ROW_7_COL_0"
          style="width: 0px; display: none; visibility: hidden;">

          10</div>

          <table class="DNGrid_TablaDatos" width="558px"
          cellpadding="0" cellspacing="0" border="0">

          <tr class="DNGrid_FilaDatos"
          id="grdLocalidades_ROW_1" onmouseover="DNGrid_OnMouseOverRow(this.id)"

          onmouseout="DNGrid_OnMouseOutRow(this.id)">

          <td id="grdLocalidades_ROW_1_COL_1"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="230px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Boston</td>

          <td id="grdLocalidades_ROW_1_COL_2"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="250px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          United States</td>

          <td id="grdLocalidades_ROW_1_COL_3"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="center" width="70px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
          ION&Localidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Editar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
          alidad_Id=8', mAlto, mAncho, 'void(0)');void(0);">

          <img alt="Ver"
          src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
          lidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Eliminar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
          class="DNGrid_ImgEdicion" /></a></td>

          </tr>

          <tr class="DNGrid_FilaDatosAlt"
          id="grdLocalidades_ROW_2" onmouseover="DNGrid_OnMouseOverRow(this.id)"

          onmouseout="DNGrid_OnMouseOutRow(this.id)">

          <td id="grdLocalidades_ROW_2_COL_1"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="230px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Buenos Aires</td>

          <td id="grdLocalidades_ROW_2_COL_2"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="250px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Argentina</td>

          <td id="grdLocalidades_ROW_2_COL_3"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="center" width="70px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
          ION&Localidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Editar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
          alidad_Id=1', mAlto, mAncho, 'void(0)');void(0);">

          <img alt="Ver"
          src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
          lidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Eliminar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
          class="DNGrid_ImgEdicion" /></a></td>

          </tr>

          <tr class="DNGrid_FilaDatos"
          id="grdLocalidades_ROW_3" onmouseover="DNGrid_OnMouseOverRow(this.id)"

          onmouseout="DNGrid_OnMouseOutRow(this.id)">

          <td id="grdLocalidades_ROW_3_COL_1"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="230px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Delta - Tigre</td>

          <td id="grdLocalidades_ROW_3_COL_2"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="250px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Argentina</td>

          <td id="grdLocalidades_ROW_3_COL_3"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="center" width="70px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
          ION&Localidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Editar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
          alidad_Id=9', mAlto, mAncho, 'void(0)');void(0);">

          <img alt="Ver"
          src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
          lidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Eliminar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
          class="DNGrid_ImgEdicion" /></a></td>

          </tr>

          <tr class="DNGrid_FilaDatosAlt"
          id="grdLocalidades_ROW_4" onmouseover="DNGrid_OnMouseOverRow(this.id)"

          onmouseout="DNGrid_OnMouseOutRow(this.id)">

          <td id="grdLocalidades_ROW_4_COL_1"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="230px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Miami</td>

          <td id="grdLocalidades_ROW_4_COL_2"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="250px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          United States</td>

          <td id="grdLocalidades_ROW_4_COL_3"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="center" width="70px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
          ION&Localidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Editar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
          alidad_Id=6', mAlto, mAncho, 'void(0)');void(0);">

          <img alt="Ver"
          src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
          lidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Eliminar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
          class="DNGrid_ImgEdicion" /></a></td>

          </tr>

          <tr class="DNGrid_FilaDatos"
          id="grdLocalidades_ROW_5" onmouseover="DNGrid_OnMouseOverRow(this.id)"

          onmouseout="DNGrid_OnMouseOutRow(this.id)">

          <td id="grdLocalidades_ROW_5_COL_1"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="230px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          New York</td>

          <td id="grdLocalidades_ROW_5_COL_2"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="250px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          United States</td>

          <td id="grdLocalidades_ROW_5_COL_3"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="center" width="70px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
          ION&Localidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Editar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
          alidad_Id=3', mAlto, mAncho, 'void(0)');void(0);">

          <img alt="Ver"
          src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
          lidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Eliminar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
          class="DNGrid_ImgEdicion" /></a></td>

          </tr>

          <tr class="DNGrid_FilaDatosAlt"
          id="grdLocalidades_ROW_6" onmouseover="DNGrid_OnMouseOverRow(this.id)"

          onmouseout="DNGrid_OnMouseOutRow(this.id)">

          <td id="grdLocalidades_ROW_6_COL_1"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="230px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Rosario</td>

          <td id="grdLocalidades_ROW_6_COL_2"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="250px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Argentina</td>

          <td id="grdLocalidades_ROW_6_COL_3"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="center" width="70px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
          ION&Localidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Editar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
          alidad_Id=5', mAlto, mAncho, 'void(0)');void(0);">

          <img alt="Ver"
          src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
          lidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Eliminar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
          class="DNGrid_ImgEdicion" /></a></td>

          </tr>

          <tr class="DNGrid_FilaDatos"
          id="grdLocalidades_ROW_7" onmouseover="DNGrid_OnMouseOverRow(this.id)"

          onmouseout="DNGrid_OnMouseOutRow(this.id)">

          <td id="grdLocalidades_ROW_7_COL_1"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="230px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          San Martín de los Andes</td>

          <td id="grdLocalidades_ROW_7_COL_2"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="left" width="250px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          Argentina</td>

          <td id="grdLocalidades_ROW_7_COL_3"
          class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

          onmouseout="DNGrid_OnMouseOutCelda(this.id)"
          onclick="DNGrid_OnClickCelda(this.id)"

          align="center" width="70px"
          style="border-left-style: none; border-right-style: none;

          border-top-style: none;
          border-bottom: solid 1px; border-width: 1px;">

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
          ION&Localidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Editar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
          alidad_Id=10', mAlto, mAncho, 'void(0)');void(0);">

          <img alt="Ver"
          src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
          /></a>

          <a
          href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
          lidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

          <img alt="Eliminar"
          src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
          class="DNGrid_ImgEdicion" /></a></td>

          </tr>

          </table>

          </div>

          </div>

          <div id="DNGrid_DivFooter_grdLocalidades" style="width:
          560px;">

          <table class="DNGrid_TablaPaginado" cellpadding="0"
          cellspacing="0" width="560px">

          <tr class="DNGrid_FilaPaginado">

          <td rowspan="4" align="Center">

          <table border="0" cellpadding="2"
          cellspacing="0" align="center">

          <tr>

          <td width="20">

          <img alt=""
          src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Primero_Dis.gif"
          class="DNGrid_Paginado_Botones" /></td>

          <td width="20">

          <img alt=""
          src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Anterior_Dis.gif"
          class="DNGrid_Paginado_Botones" /></td>

          <td
          class="DNGrid_TextoPaginado">

          # 1 / 1</td>

          <td width="20">

          <img alt=""
          src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Siguiente_Dis.gif"
          class="DNGrid_Paginado_Botones" /></td>

          <td width="20">

          <img alt=""
          src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Ultimo_Dis.gif"
          class="DNGrid_Paginado_Botones" /></td>

          </tr>

          </table>

          </td>

          </tr>

          </table>

          </div>

          <table class="DNGrid_TablaPie" cellspacing="0"
          width="560px">

          <tr class="DNGrid_FilaPie">

          <td rowspan="4">

          </td>

          </tr>

          </table>

          </td>

          </tr>

          </table>

          <div id="imagenEsperaDNGrid_grdLocalidades"
          class="DNGrid_DivImagenEspera">

          <img src="/RentaMaxis.Vista/Imagenes/esperaCallback.gif"
          /></div>

          <div id="DNGrid_DivReadOnlyDatos_grdLocalidades"
          class="DNGrid_DivDatosReadOnly">

          </div>

          <div id="DNGrid_DivReadOnlyHeader_grdLocalidades"
          class="DNGrid_DivHeaderReadOnly">

          </div>

          <div id="DNGrid_DivReadOnlyFooter_grdLocalidades"
          class="DNGrid_DivFooterReadOnly">

          </div>

          </div>

          _____

          De: Alligator [mailto:alligator_666@ <mailto:alligator_666%40yahoo.com>
          yahoo.com]
          Enviado el: jueves, 25 de septiembre de 2008 10:46
          Para: JavaScript_Official <mailto:JavaScript_Official%40yahoogroups.com>
          @yahoogroups.com
          Asunto: Re: [JavaScript] Disable grid control

          * Replies will be sent through Spamex to JavaScript_Official
          <mailto:JavaScript_Official%40yahoogroups.com> @yahoogroups.com

          * For additional info click -> www.spamex.com/i/?v=18971168

          Do you mean, you are using something like:
          <div id='myDiv'>
          <asp:datagrid>
          <!-- stuff here -->
          </asp:datagrid>
          </div>

          If that's the case then you just need to get a reference to 'myDiv' and loop
          all children elements disabling all input, textareas and selects. It would
          be way easier if you are using jQuery.
          Anyway, to be sure, could you post the portion of your html that you are
          using, so we can provide a more accurate advise?

          Thanks

          Alligator_666

          Leonardo Ghigliani <yahoogroups@ <mailto:yahoogroups%40spamex.com>
          spamex.com> wrote: Hi. I use a custom self made grid control in an ASP.NET
          application. It is
          based in a table running inside a div (to make it scrollable with overflow)

          I need to be able to disable it from client side. Which would be the best
          approach?

          In an earlier post I asked how to cover it with a div (I am doing that but I
          have a problem when the grid changes it's absolute position. Read old posts
          from 8/22 and 9/4)

          Anyway, any other approach will be appreciated.

          Inside the grid cells may appear images, text (which is not so important to
          disable) but also links, buttons, and other controls/interaction artifacts.

          It is also necessary to keep the ability to restore it back to enabled
          state.

          Thanks.

          [Non-text portions of this message have been removed]

          [Non-text portions of this message have been removed]

          [Non-text portions of this message have been removed]





          [Non-text portions of this message have been removed]





          [Non-text portions of this message have been removed]
        • Alligator
          Hi, You need to attach it to the Window Resize and Scroll events. One thing to note though is that if you use IE and have drop down controls ( tags)
          Message 4 of 16 , Oct 4, 2008
            Hi,
            You need to attach it to the Window Resize and Scroll events.
            One thing to note though is that if you use IE and have drop down controls (<select>tags) then the covering div approach might not work. You'll see the drop downs right through the covering div (nice move MS!).
            If this is your case, you might have to us an iframe instead.

            Regards

            Alligator_666


            Leonardo Ghigliani <yahoogroups@...> wrote: Nice!

            I’m not using jQuery but I can imagine that script using straight DOM.

            The other approach: Where should I attach the resize and scroll events? To
            the window? To the containing div?

            Thanks!

            Leonardo

            _____

            De: Alligator [mailto:alligator_666@...]
            Enviado el: jueves, 02 de octubre de 2008 12:48
            Para: JavaScript_Official@yahoogroups.com
            Asunto: RE: [JavaScript] Disable grid control

            * Replies will be sent through Spamex to JavaScript_Official@yahoogroups.com

            * For additional info click -> www.spamex.com/i/?v=18971168

            The Covering Div approach might be a good solution, just that in order to
            get it to work properly, you need to attach events to the resize and scroll
            events in order to adjust it's position accordingly.
            On the other side... disabling each link might be such a big deal if you can
            temporary move the href contents to a custom attribute on disabling and then
            move them back on enabling.
            If you are using jQuery this could be achieved with something like this:

            $('#DisableButton').click(function() {
            $('#DivDNGrid_grdLocalidades a').each( function() {
            this.customAttr = this.href;
            this.href = 'javascript:void(0)';
            })
            });

            Alligator_666

            Leonardo Ghigliani <yahoogroups@ <mailto:yahoogroups%40spamex.com>
            spamex.com> wrote: Yes. That’s true, but I don’t know if there is an easier
            way, because of
            links.

            Looping all children and disabling them implies disabling also any link
            (image, <a> tags, and other form of clickable references) setting, for
            instance, an href=”void(0);”. That means that I should build some stack of
            hrefs to remember the href for each element so it can be “restored” to
            enabled state. Also I should remember the whole style and class to make it
            visibly disabled for the user with another style, and then restore its
            appearance when necessary.

            I thought that, but it’s difficult. The covering div is so easy and I am
            (was) so close to get it working… ;-). I just need that div to follow my
            grid wherever it goes as if it were an annoying fly ;-)

            If it is impossible, I’ll take hands on this element crawler with the states
            stack.

            I tried to post the code but it is a bit large.

            In short terms my control renders nested divs.

            One whole containing div to make possible replacing new contents by an ajax
            function (for instance, for paging).

            Then comes a Div for header (columns headers) and two nested divs, one for
            containing data and onother that contains that div (scrollable). That way y
            can scroll data area leaving fixed headers and footer.

            Last there is a footer div for paging controls and information.

            I place some divs over header div, data div, and footer div, so I’ts
            possible to scroll data but not to click any control / links appearing
            inside nor any control in header (may appear an “add new” button).

            That is working ok, except if the grid moves it’s position.

            Thanks

            Leonardo

            <div id="DivDNGrid_grdLocalidades" class="DNGrid_DivContenedor"
            style="width: 560px">

            <script type="text/javascript">

            var grdLocalidades_PaginaActual = 1;

            var grdLocalidades_Orden = 'Localidad_Nombre';

            var grdLocalidades_OrdenTipo = 0;

            var grdLocalidades_Parametros = "";

            var grdLocalidades_ParametrosAdicionales = '';

            var grdLocalidades_ModoSeleccion = 'SinSeleccion';

            var grdLocalidades_ModoSeleccionMouseOver = 'SinSeleccion';

            </script>

            <input type="hidden" name="grdLocalidades_ParametrosMetodo" value=""
            />

            <table cellspacing="0" cellpadding="0" border="0">

            <tr>

            <td style="text-align: left;">

            <div id="DNGrid_DivEncabezado_grdLocalidades">

            <div id="grdLocalidades_ROW_0_COL_0" style="width:
            0px; display: none; visibility: hidden;">

            Id</div>

            <table id="DNGrid_TablaEncabezado_grdLocalidades"
            class="DNGrid_TablaEncabezado"

            cellspacing="0" cellpadding="0" width="560px">

            <tr id="grdLocalidades_ROW_0"
            class="DNGrid_FilaEncabezado">

            <td id="grdLocalidades_ROW_0_COL_1"
            class="DNGrid_CeldaEncabezado" align="left" width="230px"

            style="border-left-style: none;
            border-top-style: none; border-right-style: none;

            border-bottom-style: none; border-width:
            1px;">

            <a class="DNGrid_LinkOrden"
            href="javascript:CambiarOrdenGrilla('grdLocalidades', 'Localidad_nombre',
            1)"

            onmouseover="window.status='Cambiar
            orden'; return true;" onmouseout="window.status=''; return true;">

            Localidad</a><div
            id="DNGrid_DivIndicadorOrden_ASC">

             </div>

            </td>

            <td id="grdLocalidades_ROW_0_COL_2"
            class="DNGrid_CeldaEncabezado" align="left" width="250px"

            style="border-left-style: none;
            border-top-style: none; border-right-style: none;

            border-bottom-style: none; border-width:
            1px;">

            <a class="DNGrid_LinkOrden"
            href="javascript:CambiarOrdenGrilla('grdLocalidades',
            'Localidad_Pais_Nombre', 0)"

            onmouseover="window.status='Cambiar
            orden'; return true;" onmouseout="window.status=''; return true;">

            Pais</a><div
            id="DNGrid_DivIndicadorOrden_VACIO">

            </div>

            </td>

            <td id="grdLocalidades_ROW_0_COL_3"
            class="DNGrid_CeldaEncabezado" align="center"

            width="70px" style="border-left-style:
            none; border-top-style: none; border-right-style: none;

            border-bottom-style: none; border-width:
            1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=ALTA',
            mAlto, mAncho, 'onRetorno_Nuevo()');void(0);">

            <span style="color: white;
            text-decoration: none;">Nuevo  <img alt="Nueva subsección"

            src="/RentaMaxis.Vista/Imagenes/GridImgNuevo.gif" class="DNGrid_ImgEdicion"
            /></span></a></td>

            </tr>

            </table>

            </div>

            <div id="DNGrid_DivDatos_grdLocalidades"
            class="DNGrid_DivDatos" style="width: 577px;

            height: 210px">

            <div id="DNGrid_DivMarcoDatos_grdLocalidades"
            class="DNGrid_DivMarcoDatos" style="width: 560px;

            height: 210px">

            <div id="grdLocalidades_ROW_1_COL_0"
            style="width: 0px; display: none; visibility: hidden;">

            8</div>

            <div id="grdLocalidades_ROW_2_COL_0"
            style="width: 0px; display: none; visibility: hidden;">

            1</div>

            <div id="grdLocalidades_ROW_3_COL_0"
            style="width: 0px; display: none; visibility: hidden;">

            9</div>

            <div id="grdLocalidades_ROW_4_COL_0"
            style="width: 0px; display: none; visibility: hidden;">

            6</div>

            <div id="grdLocalidades_ROW_5_COL_0"
            style="width: 0px; display: none; visibility: hidden;">

            3</div>

            <div id="grdLocalidades_ROW_6_COL_0"
            style="width: 0px; display: none; visibility: hidden;">

            5</div>

            <div id="grdLocalidades_ROW_7_COL_0"
            style="width: 0px; display: none; visibility: hidden;">

            10</div>

            <table class="DNGrid_TablaDatos" width="558px"
            cellpadding="0" cellspacing="0" border="0">

            <tr class="DNGrid_FilaDatos"
            id="grdLocalidades_ROW_1" onmouseover="DNGrid_OnMouseOverRow(this.id)"

            onmouseout="DNGrid_OnMouseOutRow(this.id)">

            <td id="grdLocalidades_ROW_1_COL_1"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="230px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Boston</td>

            <td id="grdLocalidades_ROW_1_COL_2"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="250px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            United States</td>

            <td id="grdLocalidades_ROW_1_COL_3"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="center" width="70px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
            ION&Localidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Editar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
            alidad_Id=8', mAlto, mAncho, 'void(0)');void(0);">

            <img alt="Ver"
            src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
            lidad_Id=8', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Eliminar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
            class="DNGrid_ImgEdicion" /></a></td>

            </tr>

            <tr class="DNGrid_FilaDatosAlt"
            id="grdLocalidades_ROW_2" onmouseover="DNGrid_OnMouseOverRow(this.id)"

            onmouseout="DNGrid_OnMouseOutRow(this.id)">

            <td id="grdLocalidades_ROW_2_COL_1"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="230px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Buenos Aires</td>

            <td id="grdLocalidades_ROW_2_COL_2"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="250px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Argentina</td>

            <td id="grdLocalidades_ROW_2_COL_3"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="center" width="70px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
            ION&Localidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Editar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
            alidad_Id=1', mAlto, mAncho, 'void(0)');void(0);">

            <img alt="Ver"
            src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
            lidad_Id=1', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Eliminar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
            class="DNGrid_ImgEdicion" /></a></td>

            </tr>

            <tr class="DNGrid_FilaDatos"
            id="grdLocalidades_ROW_3" onmouseover="DNGrid_OnMouseOverRow(this.id)"

            onmouseout="DNGrid_OnMouseOutRow(this.id)">

            <td id="grdLocalidades_ROW_3_COL_1"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="230px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Delta - Tigre</td>

            <td id="grdLocalidades_ROW_3_COL_2"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="250px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Argentina</td>

            <td id="grdLocalidades_ROW_3_COL_3"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="center" width="70px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
            ION&Localidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Editar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
            alidad_Id=9', mAlto, mAncho, 'void(0)');void(0);">

            <img alt="Ver"
            src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
            lidad_Id=9', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Eliminar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
            class="DNGrid_ImgEdicion" /></a></td>

            </tr>

            <tr class="DNGrid_FilaDatosAlt"
            id="grdLocalidades_ROW_4" onmouseover="DNGrid_OnMouseOverRow(this.id)"

            onmouseout="DNGrid_OnMouseOutRow(this.id)">

            <td id="grdLocalidades_ROW_4_COL_1"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="230px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Miami</td>

            <td id="grdLocalidades_ROW_4_COL_2"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="250px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            United States</td>

            <td id="grdLocalidades_ROW_4_COL_3"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="center" width="70px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
            ION&Localidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Editar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
            alidad_Id=6', mAlto, mAncho, 'void(0)');void(0);">

            <img alt="Ver"
            src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
            lidad_Id=6', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Eliminar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
            class="DNGrid_ImgEdicion" /></a></td>

            </tr>

            <tr class="DNGrid_FilaDatos"
            id="grdLocalidades_ROW_5" onmouseover="DNGrid_OnMouseOverRow(this.id)"

            onmouseout="DNGrid_OnMouseOutRow(this.id)">

            <td id="grdLocalidades_ROW_5_COL_1"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="230px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            New York</td>

            <td id="grdLocalidades_ROW_5_COL_2"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="250px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            United States</td>

            <td id="grdLocalidades_ROW_5_COL_3"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="center" width="70px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
            ION&Localidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Editar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
            alidad_Id=3', mAlto, mAncho, 'void(0)');void(0);">

            <img alt="Ver"
            src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
            lidad_Id=3', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Eliminar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
            class="DNGrid_ImgEdicion" /></a></td>

            </tr>

            <tr class="DNGrid_FilaDatosAlt"
            id="grdLocalidades_ROW_6" onmouseover="DNGrid_OnMouseOverRow(this.id)"

            onmouseout="DNGrid_OnMouseOutRow(this.id)">

            <td id="grdLocalidades_ROW_6_COL_1"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="230px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Rosario</td>

            <td id="grdLocalidades_ROW_6_COL_2"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="250px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Argentina</td>

            <td id="grdLocalidades_ROW_6_COL_3"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="center" width="70px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
            ION&Localidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Editar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
            alidad_Id=5', mAlto, mAncho, 'void(0)');void(0);">

            <img alt="Ver"
            src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
            lidad_Id=5', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Eliminar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
            class="DNGrid_ImgEdicion" /></a></td>

            </tr>

            <tr class="DNGrid_FilaDatos"
            id="grdLocalidades_ROW_7" onmouseover="DNGrid_OnMouseOverRow(this.id)"

            onmouseout="DNGrid_OnMouseOutRow(this.id)">

            <td id="grdLocalidades_ROW_7_COL_1"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="230px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            San Martín de los Andes</td>

            <td id="grdLocalidades_ROW_7_COL_2"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="left" width="250px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            Argentina</td>

            <td id="grdLocalidades_ROW_7_COL_3"
            class="DNGrid_CeldaDatos" onmouseover="DNGrid_OnMouseOverCelda(this.id)"

            onmouseout="DNGrid_OnMouseOutCelda(this.id)"
            onclick="DNGrid_OnClickCelda(this.id)"

            align="center" width="70px"
            style="border-left-style: none; border-right-style: none;

            border-top-style: none;
            border-bottom: solid 1px; border-width: 1px;">

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=MODIFICAC
            ION&Localidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Editar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEditar.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=VISTA&Loc
            alidad_Id=10', mAlto, mAncho, 'void(0)');void(0);">

            <img alt="Ver"
            src="/RentaMaxis.Vista/Imagenes/GridImgVer.gif" class="DNGrid_ImgEdicion"
            /></a>

            <a
            href="Javascript:abrirVentanaModal('backend/LocalidadABM.aspx?MODO=BAJA&Loca
            lidad_Id=10', mAlto, mAncho, 'onRetorno_Modificacion()');void(0);">

            <img alt="Eliminar"
            src="/RentaMaxis.Vista/Imagenes/GridImgEliminar.gif"
            class="DNGrid_ImgEdicion" /></a></td>

            </tr>

            </table>

            </div>

            </div>

            <div id="DNGrid_DivFooter_grdLocalidades" style="width:
            560px;">

            <table class="DNGrid_TablaPaginado" cellpadding="0"
            cellspacing="0" width="560px">

            <tr class="DNGrid_FilaPaginado">

            <td rowspan="4" align="Center">

            <table border="0" cellpadding="2"
            cellspacing="0" align="center">

            <tr>

            <td width="20">

            <img alt=""
            src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Primero_Dis.gif"
            class="DNGrid_Paginado_Botones" /></td>

            <td width="20">

            <img alt=""
            src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Anterior_Dis.gif"
            class="DNGrid_Paginado_Botones" /></td>

            <td
            class="DNGrid_TextoPaginado">

            # 1 / 1</td>

            <td width="20">

            <img alt=""
            src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Siguiente_Dis.gif"
            class="DNGrid_Paginado_Botones" /></td>

            <td width="20">

            <img alt=""
            src="/RentaMaxis.Vista/Imagenes/DNGrid_Paginado_Ultimo_Dis.gif"
            class="DNGrid_Paginado_Botones" /></td>

            </tr>

            </table>

            </td>

            </tr>

            </table>

            </div>

            <table class="DNGrid_TablaPie" cellspacing="0"
            width="560px">

            <tr class="DNGrid_FilaPie">

            <td rowspan="4">

            </td>

            </tr>

            </table>

            </td>

            </tr>

            </table>

            <div id="imagenEsperaDNGrid_grdLocalidades"
            class="DNGrid_DivImagenEspera">

            <img src="/RentaMaxis.Vista/Imagenes/esperaCallback.gif"
            /></div>

            <div id="DNGrid_DivReadOnlyDatos_grdLocalidades"
            class="DNGrid_DivDatosReadOnly">

            </div>

            <div id="DNGrid_DivReadOnlyHeader_grdLocalidades"
            class="DNGrid_DivHeaderReadOnly">

            </div>

            <div id="DNGrid_DivReadOnlyFooter_grdLocalidades"
            class="DNGrid_DivFooterReadOnly">

            </div>

            </div>

            _____

            De: Alligator [mailto:alligator_666@ <mailto:alligator_666%40yahoo.com>
            yahoo.com]
            Enviado el: jueves, 25 de septiembre de 2008 10:46
            Para: JavaScript_Official <mailto:JavaScript_Official%40yahoogroups.com>
            @yahoogroups.com
            Asunto: Re: [JavaScript] Disable grid control

            * Replies will be sent through Spamex to JavaScript_Official
            <mailto:JavaScript_Official%40yahoogroups.com> @yahoogroups.com

            * For additional info click -> www.spamex.com/i/?v=18971168

            Do you mean, you are using something like:
            <div id='myDiv'>
            <asp:datagrid>
            <!-- stuff here -->
            </asp:datagrid>
            </div>

            If that's the case then you just need to get a reference to 'myDiv' and loop
            all children elements disabling all input, textareas and selects. It would
            be way easier if you are using jQuery.
            Anyway, to be sure, could you post the portion of your html that you are
            using, so we can provide a more accurate advise?

            Thanks

            Alligator_666

            Leonardo Ghigliani <yahoogroups@ <mailto:yahoogroups%40spamex.com>
            spamex.com> wrote: Hi. I use a custom self made grid control in an ASP.NET
            application. It is
            based in a table running inside a div (to make it scrollable with overflow)

            I need to be able to disable it from client side. Which would be the best
            approach?

            In an earlier post I asked how to cover it with a div (I am doing that but I
            have a problem when the grid changes it's absolute position. Read old posts
            from 8/22 and 9/4)

            Anyway, any other approach will be appreciated.

            Inside the grid cells may appear images, text (which is not so important to
            disable) but also links, buttons, and other controls/interaction artifacts.

            It is also necessary to keep the ability to restore it back to enabled
            state.

            Thanks.

            [Non-text portions of this message have been removed]

            [Non-text portions of this message have been removed]

            [Non-text portions of this message have been removed]

            [Non-text portions of this message have been removed]

            [Non-text portions of this message have been removed]







            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.