Get a Jumpstart with our Sample Apps
Results 1 to 6 of 6

Thread: Javascript Row Events vs. System Events

  1. #1
    Member
    Real Name
    Sparticuz
    Join Date
    Jun 2009
    Location
    Clearwater, FL
    Posts
    499

    Default Javascript Row Events vs. System Events

    Whats the difference between "Javascript - Row Events onClick" and "Javascript - System Events onRowSelect" in a grid?

  2. #2
    Member StephenP's Avatar
    Real Name
    Stephen Pilon
    Join Date
    Apr 2000
    Location
    Front Royal, Virginia
    Posts
    490

    Default Re: Javascript Row Events vs. System Events

    I'm not sure, but it's probably a matter off timing, i.e. which is called first. Try putting an alert box in each (with different messages) and see which comes up first.
    Stephen Pilon
    Associate Librarian
    Christendom College

  3. #3
    Member
    Real Name
    Sparticuz
    Join Date
    Jun 2009
    Location
    Clearwater, FL
    Posts
    499

    Default Re: Javascript Row Events vs. System Events

    Quote Originally Posted by StephenP View Post
    Try putting an alert box in each (with different messages) and see which comes up first.
    The System events onRowSelect gets called alot. It popped up a message when I saved the grid (in Alpha). Then again when I loaded the page with the grid (in browser). Then again when I clicked the row. Row Event's onClick NEVER got called. Bug?

  4. #4
    Member StephenP's Avatar
    Real Name
    Stephen Pilon
    Join Date
    Apr 2000
    Location
    Front Royal, Virginia
    Posts
    490

    Default Re: Javascript Row Events vs. System Events

    I put this in the System Events, onRowSelect:

    Code:
    alert('Box 1: System Events - onRowSelect');
    and this in the Row Events - onClick:

    Code:
    alert('Box 2: Row Event - onClick');
    When I start the grid, onRowSelect (i.e., Box 1) fires twice with the detail view showing on the page, once with detail view as pop-up.

    When I click on a row, onClick (Box 2) fires, then onRowSelect (Box 1) fires

    If I sort by clicking a column header, onRowSelect fires five times (with a 10 row view).

    I changed it to a 25 row view, and onRowSelect fired five times.

    In either of these last two cases, if the detail is pop-up, then onRowSelect fires four times.

    When I click the detail view link, onClick fires, then onRowSelect fires twice (presumably once for selecting the row, and once for selecting the detail--which is part of the same row)

    When looking at the detail view, if I select the Next or Previous record button, onRowSelect fires once, onClick does not fire.

    I think the answer to your question is that onClick fires only if the row is clicked on by the user, whereas onRowSelect fires whenever a row is selected by clicking, navigation, etc. Thus the names, eh?
    Stephen Pilon
    Associate Librarian
    Christendom College

  5. #5
    Member
    Real Name
    Sparticuz
    Join Date
    Jun 2009
    Location
    Clearwater, FL
    Posts
    499

    Default Re: Javascript Row Events vs. System Events

    Great! You should write for the wiki ;)

  6. #6
    Member
    Real Name
    Maroine A.
    Join Date
    Apr 2010
    Location
    Rabat, Morocco
    Posts
    106

    Default Re: Javascript Row Events vs. System Events

    Here are the definition for each event:

    The onRowSelect client side grid system event fires when a Grid row is selected. it also fires when a row is selected for both read only and editable Grids.

    The Javascript onClick row event fires when the user clicks on a row.

    I think the reason why the onRowSelect event fires twice when the grid is started is because the 1st row of the grid is automatically selected when the grid loads or initialiazes so if you have 1 grid and a detail view you will get 2 onRowSelect events firing for each 1st row of the grid, and so on...

    I hope this helps

Similar Threads

  1. Form > Events > Events ?
    By dharvey in forum Alpha Five Version 10 - Desktop Applications
    Replies: 5
    Last Post: 01-16-2011, 09:05 PM
  2. Javascript Row Events
    By wburchell in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 09-16-2010, 12:37 PM
  3. System events Javascript
    By daveh56 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 06-23-2010, 06:41 PM
  4. Grid / JS System Events / OnRowFocus
    By Steve Workings in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 01-28-2010, 08:06 PM
  5. How to stop a series of Action Javascript events if ?
    By Scholin in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 01-25-2010, 03:23 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
  •