Alpha Video Training
Results 1 to 3 of 3

Thread: Show/Hide "Add New Record" hyperlink in Grid

  1. #1
    Member
    Real Name
    Phil Samuels
    Join Date
    Jan 2011
    Posts
    188

    Default Show/Hide "Add New Record" hyperlink in Grid

    I hope someone can help. I have an older application that with a simple Grid (no detail view) that has only 6 fields. On the toolbar, there's a hyperlink where the User can enter Add a New Record (see image below):
    I want to control whether that option (hyperlink) is offered (show/hide) to the user, but I can't figure out how to conditionally, show or hide it:
    • I do know how to "hide" it (NOTE: if you use "<hide>" as a the New Record Button label, it's hidden);
    • AND, I can easily create a separate toolbar button/hyperlink to replace it (which I can conditionally show/hide);
    • BUT, I can't find a method or javascript action to "add new record" (except when you're using detail view, which I'm not using).


    There are some conditions when I don't want the "Add New Record" option to appear to the user, but I can't figure out how to do it. If you have any suggestions, I'd appreciate them.

  2. #2
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default Re: Show/Hide "Add New Record" hyperlink in Grid

    Honestly I don't know if it can be hidden or not, but one thought to get around the problem is to create two (similar looking) grids, one for updating existing records, and one specifically for entering new records.

    In the "Update/Edit Existing Customer Information" grid, the user clicks on an existing record on the screen, and the grid pops up like you have shown above, with no "Create Customer" link. The customer data is pre-populated in the fields and the user can edit the data as necessary. The user clicks the submit button and the data is saved and the window closes. At the same time you have another action button called "Create New Customer" and either display it at the bottom of this grid (like the other buttons you have on there now) or at the bottom of a list of customers, and when the user clicks on it, it opens a similar-looking grid, but this one has blank fields, and is a "Add Records Only" type of grid, which will never allow any editing of existing records, only entering a new record. To the user the pop up grids look the same, but they serve two different functions.

    The advantage of doing this way is that if you add the "New Customer" action button yourself instead of using that "New Customer link," you can put some security on it and decide when it will be displayed by security group.

    I have similar grid type lists of people, and to the right of each person row I will have a button called "Edit Information" (which opens a small pop up grid similar to yours), and at the bottom of the overall grid I have a button called "Enter New Record." As I said above, both of my button-activated pop up grids look similar, but they perform different functions and only certain people will see the "New Record" button.
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

  3. #3
    Member
    Real Name
    Phil Samuels
    Join Date
    Jan 2011
    Posts
    188

    Default Re: Show/Hide "Add New Record" hyperlink in Grid

    Hi Rich-

    THANK YOU for writing back. I LOVE creativity and your suggestion is "elegantly creative". I'm going to give it a try and see how it works for me. I can even think of several variations that will accomplish exactly what I want.

    Thanks for the great suggestion and for taking the time to write. I appreciate it.

    Phil

Similar Threads

  1. CONDITIONALLY Show "New Record" Row in Grid
    By psamuels56 in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 06-27-2016, 01:19 PM
  2. DetailView "Show/Hide" field display problems
    By jackp_MDB in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 01-30-2014, 04:32 PM
  3. Read only grid does not hide columns when using "show/hide" expression
    By Corne in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 11-07-2013, 05:13 PM
  4. howto change "New Record" hyperlink on the Grid footer
    By GarthMc in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 08-20-2010, 06:21 AM
  5. Hide "Add Record" option when opening a grid from Navigation
    By iviowa in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 04-02-2010, 03:07 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
  •