Alpha Video Training
Results 1 to 17 of 17

Thread: Disable "Save record and enter a new record"

  1. #1
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,649

    Default Disable "Save record and enter a new record"

    How do I do that in the editable detail section of a grid?

    See attached image...

  2. #2
    Member
    Real Name
    David Mildenhall
    Join Date
    Jul 2009
    Location
    Reading, UK
    Posts
    235

    Default Re: Disable "Save record and enter a new record"

    Peter,

    Is is possible to show the icon as greyed out (see customisation options on the attached) - unfortunately this does not disable it as clicking on the greyed-out icon when the detail view is dirty still shows a new record.

    I have tried some of the events to try to overcome this but without much luck.

    David.

  3. #3
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,649

    Default Re: Disable "Save record and enter a new record"

    Thanks David. I did see that, but of course...

  4. #4
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,635

    Default Re: Disable "Save record and enter a new record"

    Peter,

    I put that in the wish list, but so far no response. At least 3 of us have now requested the same thing. Any more support?

    Pat
    Pat Bremkamp
    MindKicks Consulting

  5. #5
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,649

    Default Re: Disable "Save record and enter a new record"

    Thanks for reminding me of that Pat. This one seems fairly important.

    http://msgboard.alphasoftware.com/al...ad.php?t=86705

  6. #6
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default Re: Disable "Save record and enter a new record"

    The solution is quite simple using the server side events and JavaScript. In the 'onDetailViewRender' event add
    Code:
    e.javascript = "$('"+e.tmpl.componentName+".DETAILVIEW_PART.SAVEANDENTERBUTTON').style.display = 'none';"
    This will hide the button. If it is hidden, it can't be clicked.

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

    Default Re: Disable "Save record and enter a new record"

    Jerry,

    That code does not seem to make any difference on my grids.
    Last edited by frankbicknell; 05-25-2010 at 08:58 AM.

  8. #8
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,635

    Default Re: Disable "Save record and enter a new record"

    Thanks, Jerry. I would never have been able to come up with that...I know because I tried.

    Sure seems like it takes a lot of code to make "codeless" work.....

    Pat
    Pat Bremkamp
    MindKicks Consulting

  9. #9
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,649

    Default Re: Disable "Save record and enter a new record"

    Thanks Jerry! That works great! But I have to agree w. Pat. It's always "easy" if you know the secret, in this case the syntax. This is why we need a thousand examples, a road-map really.

  10. #10
    Member Bob Moore's Avatar
    Real Name
    Robert Moore
    Join Date
    Jul 2003
    Location
    Boston, MA
    Posts
    443

    Default Re: Disable "Save record and enter a new record"

    Another option is to use the onDetailViewRender client side JavaScript event.

    Code:
    $ss('{Grid.ComponentName}.DETAILVIEW_PART.SAVEANDENTERBUTTON',{display: 'none'});

  11. #11
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,649

    Default Re: Disable "Save record and enter a new record"

    The more the merrier!

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

    Default Re: Disable "Save record and enter a new record"

    Works great now that I put the code in the right spot.

  13. #13
    Member
    Real Name
    David Mildenhall
    Join Date
    Jul 2009
    Location
    Reading, UK
    Posts
    235

    Default Re: Disable "Save record and enter a new record"

    The new settings in version 10.5 will also make it easier to achieve.

  14. #14
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,635

    Default Re: Disable "Save record and enter a new record"

    Thanks, Selwyn. That's a big help for the JavaScript challenged!
    Pat Bremkamp
    MindKicks Consulting

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

    Default Re: Disable "Save record and enter a new record"

    Here I see two examples of the same solution. One is server side and one is client side. Is there a compelling reason to use one over the other?

    My theory, which is still evolving, regarding this client server model is to perform as much computing on the server as possible and then send that data to the client. With processing as much on the server as possible less data needs to be sent. Since the bottle neck is usually the network connection from the client to the server transferring less data will result in better performance.

    Is there a rule as to when it is better to compute server side or client side? I know that some operations must be performed on the client side.

  16. #16
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,635

    Default Re: Disable "Save record and enter a new record"

    Frank,

    You've made a very good point. In this particular case, I'll use the server solution because I don't have to go look up the JavaScript syntax from my Tips and Tricks database...it's right there on the grid builder.

    But, as an Alpha developer, I'm finding I need to make a lot more decisions than I had to in the past. As the capabilities increase, it also increases expectations, and that leads to the need for a lot more planning.

    In V9 and before, there wasn't much question. It was server side Xbasic. The client side stuff wasn't nearly as developed or as reliable, so it was used very sparingly. So, I could whip out a quick grid or dialog and be satisfied.

    Now, there are so many good ways to achieve the same thing, I find myself redoing perfectly good, functioning modules because I've found (or learned to use) another JavaScript event tucked away in the field events, or the row events or the system events that looks faster or prettier, or in some cases, just for the "wow" factor.

    I suppose, over time, the preferred way will shake out. I'm the kind of guy who only knows one way to drive to the grocery store, and all this new capability in Alpha (and the requests of my clients who see stuff on this board and want it!) is taking me into new neighborhoods and down a few blind alleys, but also some very rewarding ways.

    I don't see any sign that Alpha is going to pause to let us catch our breath!

    Pat
    Pat Bremkamp
    MindKicks Consulting

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

    Default Re: Disable "Save record and enter a new record"

    Quote Originally Posted by Pat Bremkamp View Post
    Frank,

    I don't see any sign that Alpha is going to pause to let us catch our breath!

    Pat
    Yes, it's very exciting.

Similar Threads

  1. To "zoom to record" or to "open form" using action scripting, that is the question.
    By georgefurnel in forum Alpha Five Version 9 - Desktop Applications
    Replies: 4
    Last Post: 06-18-2008, 07:32 PM
  2. Duplicating a "Parent" record complete with "Children"
    By Peterg in forum Alpha Five Version 7
    Replies: 4
    Last Post: 02-23-2006, 10:40 AM
  3. Help with "enter new record in lookup table"
    By jerry cooper in forum Alpha Five Version 7
    Replies: 0
    Last Post: 01-09-2006, 08:13 PM
  4. "Enter new record"...not blank
    By Paul Simison in forum Alpha Five Version 5
    Replies: 24
    Last Post: 03-03-2005, 10:37 AM
  5. Action Scripting "Save Record" anomaly?
    By brett s in forum Alpha Five Version 5
    Replies: 11
    Last Post: 06-23-2004, 05:48 AM

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
  •