1 Reply Latest reply on Aug 9, 2010 10:58 AM by Blue-Cloud

    Hide/Show cfgrid

    Blue-Cloud Level 1

      Is there any way to show a hidden cfgrid based
      on an OnChange event from another cfgrid? I've tried using

      a javascript function call.

       

      <!--- First grid excerpt  --->...

      bind="cfc:ATC._cfc.GetRCPsForFTEs.GetFTEs({cfgridpage},
             {cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},{RCPs4FTEs.RCP_ID})"
            onChange="javascript:toggleEdit(EditTog)">

       

      <!--- 2nd grid excerpt  --->

       

       

       

       

       

      <!--- hide/show grid  --->
      <script language="JavaScript">
      function ChangeGrid(obj) {
         if (document.getElementById(obj).style.display == ")
         {document.getElementById(obj).style.display = 'none';}
         else
         {document.getElementById(obj).style.display = ";}
        
         alert("function ran");
      }
      </script>

       

       

      If not,
      any suggestions on how I could show the hidden
      cfgrid from another cfgrid by some other method?

       

      Thanks

        • 1. Re: Hide/Show cfgrid
          Blue-Cloud Level 1

          Sorry. My previous post was incomplete.

          This should be the full message:

           

          Is There any way to show a hidden cfgrid based on an OnChange event from another cfgrid?

           

          I tried using a javascript function:

           

          <!--- show/hide cfgrid  --->
          <script language="JavaScript">
          function ToggleEdit(obj) {
             if (document.getElementById(obj).style.display == ")
             {document.getElementById(obj).style.display = 'none';}
             else
             {document.getElementById(obj).style.display = ";}
          }
          </script>

           

          <!--- 1st grid excerpt  --->

          ...

          bind="cfc:ATC._cfc.GetRCPsForFTEs.GetFTEs({cfgridpage},
                 {cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},{RCPs4FTEs.RCP_ID})"
                onChange="javascript:toggleEdit(EditTog)">

          ...

           

          <!--- 2nd grid excerpt  --->

           

          <div id="EditTog" style="display:none">

           

             <cfform  name="FTE_EDIT">
             <!--- 7/12/10 Update an FTE chosen from the 2nd grid.  --->
          <!---                 values="#ValueList(qChosenFTE.Cat_Name)#"
                        valuesdisplay="#ValueList(qChosenFTE.Cat_Name)#" --->
                 <cfgrid name= "FTE_EDIT"

          ...

           

          Any suggestions on what might work?

           

          Thanks.