Alpha Video Training
Results 1 to 5 of 5

Thread: Basic grid record positioning question

  1. #1
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,065

    Default Basic grid record positioning question

    Hi
    I have a grid that shows invoices from an invoices table, ordered by Date.
    Upon opening the grid, i would like it to show today's invoices, i.e to seek the first invoice from today, and put it as the topmost row in the grid, but still, the user can use the navigation buttons to go back to previous dates or forth for future invoices...How do i do that?

    Thanks
    Jaime

  2. #2
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,879

    Default Re: Basic grid record positioning question

    You already have it sorted by date so the most recent invoice always would appear at the top, right? You can set how many rows a grid will show by default in grid properties. So if your grid is setup to show 25 then the grid will automatically have arrows underneath to navigate to the next 25. These options can be changed in 'Layout Options' in the Grid properties page.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  3. #3
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,763

    Default Re: Basic grid record positioning question

    I don't know if you can position a specific record at the top of a page... but maybe this will be good enough.

    This finds the record position you're after... in this case based on today's date... and then moves to the page that record is on... and then makes that record the current record... where ever that record is in the page.

    Have a look... http://www.youtube.com/watch?v=GvNOPR4i8mI

    Attached is the grid. It won't run because of the connection... but the code is all there.
    Attached Files Attached Files

  4. #4
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,065

    Default Re: Basic grid record positioning question

    David what you described is exactly what i am after...Seems such a basic feature i was sure there was some property for it in the grid :-) Thank you very much for taking the time!

  5. #5
    Member
    Real Name
    Michael Cornford
    Join Date
    Oct 2011
    Location
    East Sussex, UK
    Posts
    884

    Default Re: Basic grid record positioning question

    Jamie

    You could make a view, calculate the days from today's date.
    By squaring the result you have 0 to a positive number.
    If you wanted to differentiate between future and past make the days from today's date the second sort column.

    This can all be done in SQL.

    There will be no need for code. No records are lost you have just changed the order.

    Michael

Similar Threads

  1. Basic Grid Component Question on Lookup Featrue
    By JetLi in forum Mobile & Browser Applications
    Replies: 10
    Last Post: 01-27-2014, 11:59 AM
  2. Positioning linked grid
    By Larry Gordon in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 11-07-2012, 12:54 PM
  3. Basic question
    By Eric Johnson in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 11-19-2009, 10:20 PM
  4. a basic question
    By totalbiz in forum Alpha Five Version 9 - Desktop Applications
    Replies: 3
    Last Post: 03-24-2009, 01:13 AM
  5. Positioning With Record Number
    By Red Abicht in forum Alpha Five Version 4
    Replies: 2
    Last Post: 04-15-2002, 04:31 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
  •