Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Child grid in pop up window disappearing from view

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kingcarol
    replied
    Re: Child grid in pop up window disappearing from view

    Additional Notes:

    1 - If your target grid is one with a Search part that has the property 'Hide Grid When No Search Active' checked, then the javascript needs to be put in onSearchRender rather than in onGridRender

    2 - I've noticed that the issue of the target grid disappearing only seems to happen if the target grid is being opened via a hyperlink, and NOT when the target grid is opened via a button. You can see that the hyperlink, for some reason, causes scrolling to the top of the first parent grid, but the button doesn't. Here is a 'probably too long' video I just sent to Alpha about it, because I find this curious. http://screencast.com/t/LEsl9eCER

    Leave a comment:


  • Davidk
    replied
    Re: Child grid in pop up window disappearing from view

    Nice.

    Leave a comment:


  • kingcarol
    replied
    Re: Child grid in pop up window disappearing from view

    One more thing about this...
    I realized that the target grid I'm opening with the hyperlink is opened from several other grids and that it's possible I may forget to put the div into the window title when opening the target grid from other grids. So I have put an if statement in the javascript that we are putting in the OnGridRender event of the target grid. (AND I have removed the Timeout part).

    So to sum up:

    1 - On the grid that has the hyperlink to open the target grid, I put the following in the Window Title on the Open Grid Component genie:
    Code:
    <div id="ScrollMarker"></div>POs and Costs For Job {JOB_CODE} and Cost Code {SUB_CODE}
    2 - On the target grid, in OnGridRender client side event, I put the following:
    Code:
    if ($('ScrollMarker')) {
    	var ele = $('ScrollMarker');
    	$swto(ele);
    }

    Leave a comment:


  • kingcarol
    replied
    Re: Child grid in pop up window disappearing from view

    Thanks again, Frank and David! The deed is accomplished! (altho I think I might try removing the Timeout part and see if more instantenous feel)
    Show video of the success: http://screencast.com/t/3CFIMxBPeg

    Leave a comment:


  • Davidk
    replied
    Re: Child grid in pop up window disappearing from view

    If you'd like the div id in the title, then get into the Title section... by default it's HTML... right? But, there another tab... Source. Click on that and build your title with the div id in place.

    No, no, no... I see now. Ignore the above... long day.

    Get rid of the Freeform Area, Above Grid stuff in the target grid... but leave the Javascript code.

    Your target grid... It's a pop-up window... right? And you're setting the title in the main grid call, under "Target Window...", Window Title... is that right?

    So, in there put...

    <div id="ScrollMarker"></div>POs and Costs For Job {JOB_CODE} and Cost Code {SUB_CODE}

    See how that works.

    EDIT: I see the problem with your "span" id HTML. You must enclose the id in double quotes, not single quote. All IDs must be double quotes. Just change that and all with be fine.
    Last edited by Davidk; 05-30-2012, 08:09 AM.

    Leave a comment:


  • kingcarol
    replied
    Re: Child grid in pop up window disappearing from view

    David, your code is working as it should. THANK YOU. I did realize after putting the div in the freeform area above that grid that the user would not see the window title, so thought I'd try Frank's suggestion. (THANK YOU, TOO, Frank) But my Window Title was:

    POs and Costs For Job {JOB_CODE} and Cost Code {SUB_CODE}
    so that the user would see the job and cost code in the title and know what the filter was based on.

    So I tried putting the following for the window title:
    POs and Costs For Job {JOB_CODE} and Cost Code {SUB_CODE}<span id='ScrollMarker'></span>

    and get a script error: Expected '}'

    If I remove the job and cost code references, but leave the div part, I do not get that error, so there's something about combining the div stuff with the stuff to reference the values in some fields.... Does anyone have a guess about this?

    Leave a comment:


  • Davidk
    replied
    Re: Child grid in pop up window disappearing from view

    Carol, I get the same error, but I think it's just a timing issue. You could try increasing the setTimeout... or... let's put the javascript into another place. I just tried this and it works great.

    In your target grid... the one you're opening from the link... open it and get into the Grid Properties and go to the Freeform Edit Region, Above Grid, and put this in...

    Code:
    <div id="ScrollTo"></div>
    and click OK.

    Next, click on the Client-side Events at the left side, and find the OnGridRender event. In here put...

    Code:
    setTimeout(function() { 
    var ele = $('ScrollTo');
    $swto(ele);
    },100);
    So... now when you click the link, the grid opens, renders, and scrolls to the Div ID that we set up at the top of the grid.

    Not even sure that you need the setTimeout, but what the heck... what's 100 milliseconds between friends. Selwyn comes up with the coolest stuff... never even heard of $swto... sheesh.
    Last edited by Davidk; 05-29-2012, 04:20 PM.

    Leave a comment:


  • frankbicknell
    replied
    Re: Child grid in pop up window disappearing from view

    Originally posted by kingcarol View Post
    Hi Frank, do you think it would be put in the OnAjaxCallbackComplete event of the target window?
    yes

    Leave a comment:


  • agillbb
    replied
    Re: Child grid in pop up window disappearing from view

    I agree with Jaime, but with a tweak - when defining how your callback component will be opened (not in the actual component, but in the action javascript callback definition), try settin the title to: My Title<span id='carol'></span>
    Note this is the same trick you might use to close a popup where you might call closeParentA5Window('carol');
    Andy.

    Leave a comment:


  • kingcarol
    replied
    Re: Child grid in pop up window disappearing from view

    just tried that, Jaime. makes sense to me. And have tried other stuff, too, but no matter what, I get script error that 'tagName is null or not an object'

    Leave a comment:


  • WindForce
    replied
    Re: Child grid in pop up window disappearing from view

    Carol - i'm an Alpha and JavaScript newbie as well, but thinking logically, i think this should be something like:
    <div id="carol"></div>

    Then in your javascript:
    setTimeout(function() {
    var ele = $('carol');
    $swto(ele);
    },100);

    Jaime

    Leave a comment:


  • kingcarol
    replied
    Re: Child grid in pop up window disappearing from view

    Well, I'm just so clumsy at Javascript and have to admit that I know how to put something in a div, but have no idea how to refer to that div in the code Selwyn sent. (need an embarrassment icon...)

    Leave a comment:


  • Davidk
    replied
    Re: Child grid in pop up window disappearing from view

    In your link "View POs and Cost...", this is opening your grid... so I'm going to guess it's Action Javascript? Put the code in there... another Action Javascript, as In-Line Javascript, AFTER the grid opening. I'm guessing that's what the timeout is for... give the grid a chance to open, then scroll to it. As for the ID, any ID will probably do. Get the whole thing opened, in Firefox, then in Firebug see what ID you have to work with in the grid that's opening from the "View POs..." link. You've got some title text on your grid... "Edit Marlow..." so maybe wrap that in a Div ID and use that.

    Leave a comment:


  • agillbb
    replied
    Re: Child grid in pop up window disappearing from view

    Selwyn stated in his note to put in in the button, not in an event. Try adding it to the onclick event after your callback line.
    Andy.

    Leave a comment:


  • kingcarol
    replied
    Re: Child grid in pop up window disappearing from view

    Hi Frank, do you think it would be put in the OnAjaxCallbackComplete event of the target window?

    Leave a comment:

Working...
X