Alpha Video Training
Results 1 to 8 of 8

Thread: Hide grid in when calling the grid a second time

  1. #1
    Member
    Real Name
    Ruud Luiten
    Join Date
    Apr 2011
    Location
    Curacao
    Posts
    15

    Default Hide grid in when calling the grid a second time

    I use a grid with a detail view. When I call the same grid a second time (this time in a modal popup window) I would like the hide the grid part and only show the detail view. How can i do this?

  2. #2
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: Hide grid in when calling the grid a second time

    I would like to do something similar. I would like to just be able to have a collapsible feature that would just collapse the parent grid not the linked child grid. Hopefully someone can answer this for us.

  3. #3
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,819

    Default Re: Hide grid in when calling the grid a second time

    From where are you calling the grid a second time? From the first iteration of the main grid? From the first iteration of the detail? Or somewhere else?

  4. #4
    Member
    Real Name
    Ruud Luiten
    Join Date
    Apr 2011
    Location
    Curacao
    Posts
    15

    Default Re: Hide grid in when calling the grid a second time

    I have a button in the first grid. (not in de detail) that loads the grid again.

  5. #5
    Member
    Real Name
    Ruud Luiten
    Join Date
    Apr 2011
    Location
    Curacao
    Posts
    15

    Default Re: Hide grid in when calling the grid a second time

    Try to use the accordion form of the grid.

  6. #6
    Member
    Real Name
    Ruud Luiten
    Join Date
    Apr 2011
    Location
    Curacao
    Posts
    15

    Default Re: Hide grid in when calling the grid a second time

    Try the following code in the "onGridInitializeComplete" event in the javascript system events. That will do the trick.


    var hasParentObject = {Grid.object}.getParentObject();
    if (hasParentObject) {
    var cName = {Grid.object}.gridId + '.GRID_PART.FORM_CONTAINER_DIV';
    var divToHide=document.getElementById(cName);
    divToHide.style.display="none";
    }

  7. #7
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: Hide grid in when calling the grid a second time

    Quote Originally Posted by ruudluiten View Post
    Try the following code in the "onGridInitializeComplete" event in the javascript system events. That will do the trick.


    var hasParentObject = {Grid.object}.getParentObject();
    if (hasParentObject) {
    var cName = {Grid.object}.gridId + '.GRID_PART.FORM_CONTAINER_DIV';
    var divToHide=document.getElementById(cName);
    divToHide.style.display="none";
    }
    Thanks for sharing that code. It gave me the boost I needed.
    I have this code in an action button on the above grid section.
    Code:
    var oParentObject = {grid.Object}.getParentObject();
    var cDivID = oParentObject.gridId + '.GRID_PART.FORM_CONTAINER_DIV';
    var eleID = $(cDivID);
    
    if (eleID.hidden == false)
    {
    	eleID.hidden = true;
    	this.innerHTML = "+ SHOW PARENT GRID";
    }
    else
    {
    	eleID.hidden = false;
    	this.innerHTML = "- HIDE PARENT GRID";
    }

  8. #8
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: Hide grid in when calling the grid a second time

    Quote Originally Posted by frankbicknell View Post
    Thanks for sharing that code. It gave me the boost I needed.
    I have this code in an action button on the above grid section.
    Code:
    var oParentObject = {grid.Object}.getParentObject();
    var cDivID = oParentObject.gridId + '.GRID_PART.FORM_CONTAINER_DIV';
    var eleID = $(cDivID);
    
    if (eleID.hidden == false)
    {
    	eleID.hidden = true;
    	this.innerHTML = "+ SHOW PARENT GRID";
    }
    else
    {
    	eleID.hidden = false;
    	this.innerHTML = "- HIDE PARENT GRID";
    }
    That is the button is in the Above grid Freeform Edit Region of the linked child grid.

Similar Threads

  1. Grid Events Calling UDFs
    By Steve Workings in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 04-15-2011, 11:25 AM
  2. Calling Xbasic from a grid
    By JimDK in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 10-22-2010, 12:02 PM
  3. Update grid field after calling a a5w page
    By ierpsite in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 04-11-2010, 07:20 PM
  4. Video : Calling a Detail View with an Icon Displayed in Grid
    By Bob Moore in forum Application Server Version 10 - Web/Browser Applications
    Replies: 9
    Last Post: 03-13-2010, 03:22 PM
  5. Search hide / Grid Hide
    By David Henderson in forum Alpha Five Version 6
    Replies: 5
    Last Post: 08-07-2004, 10:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •