Alpha DevCon 2018
Results 1 to 18 of 18

Thread: Showing Parent ID in the title of a detail View popup window

  1. #1
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    951

    Default Showing Parent ID in the title of a detail View popup window

    Hi
    I have a grid with a DV. I setup the DV as popup window.
    In the title of the DV, i would like to show something like "Details for 12345" where 12345 is my OrderID field.
    How do i do that?

    Thanks
    Jaime

  2. #2
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,380

    Default Re: Showing Parent ID in the title of a detail View popup window


  3. #3
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    951

    Default Re: Showing Parent ID in the title of a detail View popup window

    Many thanks, exactly what i needed...
    Jaime

  4. #4
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,498

    Default Re: Showing Parent ID in the title of a detail View popup window

    Lance - thanks for posting that video link. I just used it and it worked! So for those of you who like to copy and paste (like me...:), here you go...

    in Client Side event AfterDetailViewOpen:
    Code:
    row = {grid.object}._detailViewRow
    var x = {grid.object}.getValue('G','JOB_CODE',row);
    var y = {grid.object}.getValue('G','JobAddress',row);
    {grid.object}._dvFloatingWindow.setTitle('Job Log for: ' + x + '-' + y);
    NOTE: I'm wondering, though, if there might be an issue with the window title if you are entering a NEW record that has no values yet. Haven't tried it, but I wonder if you might get some values in the window title that are from a row other than the new record row?
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  5. #5
    Member leetv's Avatar
    Real Name
    Lee Taylor-Vaughan
    Join Date
    Aug 2010
    Location
    Hillsborough, NJ/Avondale, AZ/Sheffield, UK
    Posts
    348

    Default Re: Showing Parent ID in the title of a detail View popup window

    Carol,

    on a new record it give me the last row's information.
    Ideally, I'd like it to show "New Record" or something... any idea on how to put and if statement and reference an ID field that doesn't have an ID yet? (in JS).
    Lee

  6. #6
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    596

    Default Re: Showing Parent ID in the title of a detail View popup window

    Quote Originally Posted by leetv View Post
    Carol,

    on a new record it give me the last row's information.
    Ideally, I'd like it to show "New Record" or something... any idea on how to put and if statement and reference an ID field that doesn't have an ID yet? (in JS).
    Lee
    Well I'm not Carol, but you can add
    Code:
    {grid.object}._dvFloatingWindow.setTitle('New Record');
    to the afterDetailViewNewRecord event to get what you're looking for.

    Or, if you want the low tech approach, just change the Detail View Window Title in the Grid's detail view properties setting.
    Jim Coltz
    Alpha Custom Database Solutions, LLC
    A5CustomSolutions.com
    jimcoltz@a5customsolutions.com

  7. #7
    Member leetv's Avatar
    Real Name
    Lee Taylor-Vaughan
    Join Date
    Aug 2010
    Location
    Hillsborough, NJ/Avondale, AZ/Sheffield, UK
    Posts
    348

    Default Re: Showing Parent ID in the title of a detail View popup window

    Jim,
    Thanks a ton.. exactly what i was looking for.


    (I just sent you an email about your calendar control).

    Lee

  8. #8
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    596

    Default Re: Showing Parent ID in the title of a detail View popup window

    Thanks Lee! A reply to your email is on the way.
    Jim Coltz
    Alpha Custom Database Solutions, LLC
    A5CustomSolutions.com
    jimcoltz@a5customsolutions.com

  9. #9
    Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,698

    Default Re: Showing Parent ID in the title of a detail View popup window

    This is an old tread that I found useful.

    I can put this code:

    {grid.object}._dvFloatingWindow.setTitle('Enter a New Appointment');

    in the inline javascript of a button that I use to call the enternewdialog etc

    but when I do that, it overrides the title that should show when editing the detail view record, i.e., Edit Appointment"

    So, bottom line is I am looking to have "New Appointment" display in the title when the user clicks my NewAppt button, and "Edit Appointment" when the user edits a record. Any suggestions?
    Gary S. Traub, Ph.D.


  10. #10
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Showing Parent ID in the title of a detail View popup window

    if i understand correctly then
    in the detail view set up, in the properties of the detail view
    uncheck has title
    set the title to editing appointment.
    then go the button which calls for new records insertion ( you should make the link new record link blank in order for you to have abutton of your own) preferably a toolbar button and add this code
    Code:
    {grid.object}._dvFloatingWindow.setTitle('Enter a New Appointment');
    {grid.Object}.detailViewNewRecord();
    that should do what you are looking for.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  11. #11
    Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,698

    Default Re: Showing Parent ID in the title of a detail View popup window

    Hi Gandhi,

    Thanks a lot for responding.

    That is exactly what I did. The problem is that it works fine the first time. but once I click the NewAppt button once, title says "New Appt" from then on, whether I click NewAppt or Edit Appt
    Gary S. Traub, Ph.D.


  12. #12
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Showing Parent ID in the title of a detail View popup window

    yes, i do notice that now. i tried few tricks nothing seems to work.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  13. #13
    Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,698

    Default Re: Showing Parent ID in the title of a detail View popup window

    Thanks again for looking.

    How do you title your detail view window? Or do you use other method (a separate ux or grid as a form) besides detail view to edit records or add new records?
    Gary S. Traub, Ph.D.


  14. #14
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Showing Parent ID in the title of a detail View popup window

    take a look at video 53 in version 10, that might shed some light.
    normally i use grid to show records, dialogs to add/edit record.
    grids are easy to work with, but dialogs have more control and since they are not bound to back end as grids are, you can leave them hanging around for awhile and only when you are happy you can save them.
    but there are times grids come in handy, like row expanders, they can even mimic dialog with repeating section, if you like.
    there is no hard and fast rule that i follow, but by and large grid to show dialog to enter.
    Last edited by GGandhi; 09-29-2017 at 04:28 AM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  15. #15
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Showing Parent ID in the title of a detail View popup window

    if you are open to the idea of not having a detail view then you can have a read only grid and a dialog both based on the same table.
    then add a button to the field list to edit and a toolbar button to add new customer. name these two pop up windows accordingly. when you add the pop up for editing you can include title as "Editing {any_field_name}" so that the title will be descriptive even tho' the data is self explanatory.
    see if this is okay with you.

    here is an example:
    https://www.screencast.com/t/NWNtJqoY
    Last edited by GGandhi; 09-29-2017 at 08:57 AM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  16. #16
    Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,698

    Default Re: Showing Parent ID in the title of a detail View popup window

    Hi Gandhi,

    That is what I have been doing for years. And it works fine. But I think there are lots of advantages to using the detail view, like speed of response, less components to keep track of or having to update 2 components instead of one when something changes, etc. And I was thinking that the detail view is the "built in" way, so they must have fixed this title issue by now. But alas ...

    Your thoughtful replies are very much appreciated.
    Gary S. Traub, Ph.D.


  17. #17
    Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,698

    Default Re: Showing Parent ID in the title of a detail View popup window

    Problem Solved:

    I can now use the detail view for both editing records and entering new records, and can control the window title as follows:

    1. For new records, create a button for the read only grid's toolbar and insert the following code into in-line javascript of action scripting:

    {grid.Object}.detailViewNewRecord();
    row = {grid.object}._detailViewRow
    {grid.object}._dvFloatingWindow.setTitle('Enter New Patient');

    2. For editing exisitng records, instead of using the detail view link, insert a hyperlink into the read only grid and put the following code in the onclick event:

    var rowNum = {grid.rowNumber};
    {grid.Object}.detailView(rowNum);
    {grid.object}._dvFloatingWindow.setTitle('Edit Patient Information');
    Gary S. Traub, Ph.D.


  18. #18
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Showing Parent ID in the title of a detail View popup window

    very good.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

Similar Threads

  1. Popup Modals nor Linked Detail View works - Help
    By cbbankz in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 08-19-2013, 11:45 AM
  2. Video 65 and Detail View in popup window
    By gaby_h in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 08-02-2011, 02:40 PM
  3. AJAX popup window causes parent to scroll
    By Steve Wood in forum Application Server Version 10 - Web/Browser Applications
    Replies: 7
    Last Post: 05-26-2011, 09:40 AM
  4. PopUp Detail View Window Title
    By bterhart in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 01-09-2011, 07:50 PM
  5. How do I control size of modal popup detail window?
    By fsi in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 12-05-2009, 02:19 PM

Posting Permissions

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