Alpha Video Training
Results 1 to 3 of 3

Thread: SetFocus to NewRecord OR Create Button to replace "Enter new Record" on Grid

  1. #1
    Member
    Real Name
    Kim Gillan
    Join Date
    Apr 2011
    Location
    Denver
    Posts
    106

    Default SetFocus to NewRecord OR Create Button to replace "Enter new Record" on Grid

    I have seen something about this in the past, but have been searching for hours and not found what I need.

    Problem:
    when multiple users are entering records into an "editable" grid, the records are "jumping'. ie they enter record, and when they "save" the record appears to be lost to them (it's really just on the LAST page).

    I have tried setting the fields in the Grid Update to only add new record on last page. However, that only puts it at the bottom of the CURRENT page. I cannot seem to force the new record to FIRST move to Last page, THEN add new record.

    I have tried doing an ajaxcallback in CanNewRowsShow with variations of the following: (I have also tried other Client Side, as well as some ServerSide, all to no avail)

    REturn this javascript from callback: (which the 'alert' works, but doesn't seem to do anything prior to 'alert')
    GoToLastPage= "var rowNum = GRID1_GridObj._rowsInGrid; {grid.Object}.setSelectedRow(rowNum);alert(rowNum);"

    OR embedding this directly in the callback and only returning 'alert' [again, alert then works but does not go to last page]
    <<%js%
    {grid.Object}.pageNavigate('last');
    %js%

    AND I have also tried just returning :

    gotolastpage="{grid.Object}.pageNavigate('last');"

    AND I have tried just putting {grid.Object}.pageNavigate('last'); directly in CanNewRowsShow, in which case
    1)FIRST the new record row is added to users current page
    2) THEN the pointer is moved to last page.

    This just seems like an everyday thing that people would want to do (go to last page before doing new enters) and should not be this difficult.
    It's probably very simple, but I just can't make it work.

  2. #2
    "Certified" Alphaholic chadbrown's Avatar
    Real Name
    Chad Brown
    Join Date
    Aug 2007
    Location
    Aurora, Ontario, Canada
    Posts
    1,412

    Default Re: SetFocus to NewRecord OR Create Button to replace "Enter new Record" on Grid

    A few things that come to mind on this one.

    1 Simply make the newest rows first that way they can see the entry right away.

    2 Create a simple grid that contains only the last entry filtered by the user and put that grid above or below the grid so that when they submit it shows them that they can see the last entry that they made.

    3 Create a couple of variables that you could use in a msg and put the message above the grid.. something like last entry by you was e.rv.session.lastinv and whatever else may be relevant.

    I have used all 3 before each have their benefits.
    Chad Brown

  3. #3
    Member
    Real Name
    Kim Gillan
    Join Date
    Apr 2011
    Location
    Denver
    Posts
    106

    Default Re: SetFocus to NewRecord OR Create Button to replace "Enter new Record" on Grid

    Quote Originally Posted by chadbrown View Post
    A few things that come to mind on this one.

    1 Simply make the newest rows first that way they can see the entry right away.

    I have used all 3 before each have their benefits.
    Thank you Chad for your suggestions, all very good. I can probably make do with the first one.

    I am using Row Expander Grids with the main grid. After a user Inserts New Record, they may or may not need to enter a New Record in the RowExpander Grid, which is why I really need the focus to stay on the Newly Inserted Record after Submit.

    This is a Feature that I really thought A5 would include in their V11, just seems like such a common need.

    People should be able to, with a few clicks under Grid Update Settings, choose how they want the Insert Properties (NewRecordHyperlink) to work:
    1) should be able to force position to last Record in Grid prior to insert
    2) should be able to say "stay on Newly Inserted Record" after Submit
    3) should also be able to choose if we want the NewRecordInsert Hyperlink to be a Hyperlink or a button, without any additional programming.
    4) should make the NewRecordInsert Hyperlink "editable" under Grid Update Properties, just like other buttons or ActionButtons are editable.

    Maybe this is already included, and I just don't know where to look. But this should not cause people brain injury.

Similar Threads

  1. "Save & Enter New Record" button
    By Leonw43 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 04-15-2011, 06:42 PM
  2. Disable "Save record and enter a new record"
    By Peter.Greulich in forum Application Server Version 10 - Web/Browser Applications
    Replies: 16
    Last Post: 05-30-2010, 11:34 AM
  3. Field rule lookup - select "A"; enter "X"
    By CALocklin in forum Alpha Five Version 8
    Replies: 5
    Last Post: 01-24-2008, 04:45 PM
  4. 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
  5. "Enter new record"...not blank
    By Paul Simison in forum Alpha Five Version 5
    Replies: 24
    Last Post: 03-03-2005, 10:37 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
  •