When trying to stop a grid from being scrollable, turned of the scroll bars, and use this property along with ON KEY LABEL to intercept the PgUp and PgDn keys when the grid has focus:

 

** END HEADER -- do not remove this line

//

// Generated on 11/30/2007

//

parameter bModal

local f

f = new GridKeyTestForm()

if (bModal)

   f.mdi = false // ensure not MDI

   f.readModal()

else

   f.open()

endif

class GridKeyTestForm of FORM

   with (this)

      height = 16.0

      left = 31.7143

      top = 0.4545

      width = 64.0

      text = ""

   endwith

   this.DQUERYSAMPLES1 = new DATABASE()

   this.DQUERYSAMPLES1.parent = this

   with (this.DQUERYSAMPLES1)

      left = 31.0

      top = 2.0

      databaseName = "DQUERYSAMPLES"

      active = true

   endwith

   this.CUSTOMERS1 = new QUERY()

   this.CUSTOMERS1.parent = this

   with (this.CUSTOMERS1)

      left = 31.0

      top = 2.0

      database = form.dquerysamples1

      sql = "select * from customers.dbf"

      active = true

   endwith

   this.GRID1 = new GRID(this)

   with (this.GRID1)

      onGotFocus = class::GRID1_ONGOTFOCUS

      onLostFocus = class::GRID1_ONLOSTFOCUS

      dataLink = form.customers1.rowset

      columns["COLUMN1"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN1"].dataLink = form.customers1.rowset.fields["customerid"]

      columns["COLUMN1"].editorType = 1 // EntryField

      columns["COLUMN1"].width = 15.7143

      columns["COLUMN2"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN2"].dataLink = form.customers1.rowset.fields["company"]

      columns["COLUMN2"].editorType = 1 // EntryField

      columns["COLUMN2"].width = 53.7143

      columns["COLUMN3"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN3"].dataLink = form.customers1.rowset.fields["lastname"]

      columns["COLUMN3"].editorType = 1 // EntryField

      columns["COLUMN3"].width = 21.4286

      columns["COLUMN4"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN4"].dataLink = form.customers1.rowset.fields["firstname"]

      columns["COLUMN4"].editorType = 1 // EntryField

      columns["COLUMN4"].width = 21.4286

      columns["COLUMN5"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN5"].dataLink = form.customers1.rowset.fields["phone"]

      columns["COLUMN5"].editorType = 1 // EntryField

      columns["COLUMN5"].width = 28.5714

      columns["COLUMN6"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN6"].dataLink = form.customers1.rowset.fields["address1"]

      columns["COLUMN6"].editorType = 1 // EntryField

      columns["COLUMN6"].width = 42.8571

      columns["COLUMN7"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN7"].dataLink = form.customers1.rowset.fields["address2"]

      columns["COLUMN7"].editorType = 1 // EntryField

      columns["COLUMN7"].width = 42.8571

      columns["COLUMN8"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN8"].dataLink = form.customers1.rowset.fields["city"]

      columns["COLUMN8"].editorType = 1 // EntryField

      columns["COLUMN8"].width = 28.5714

      columns["COLUMN9"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN9"].dataLink = form.customers1.rowset.fields["state"]

      columns["COLUMN9"].editorType = 1 // EntryField

      columns["COLUMN9"].width = 7.1429

      columns["COLUMN10"] = new GRIDCOLUMN(form.GRID1)

      columns["COLUMN10"].dataLink = form.customers1.rowset.fields["zip"]

      columns["COLUMN10"].editorType = 1 // EntryField

      columns["COLUMN10"].width = 14.2857

      with (columns["COLUMN1"].headingControl)

         value = "CustomerID"

      endwith

      with (columns["COLUMN2"].headingControl)

         value = "Company"

      endwith

      with (columns["COLUMN3"].headingControl)

         value = "LastName"

      endwith

      with (columns["COLUMN4"].headingControl)

         value = "FirstName"

      endwith

      with (columns["COLUMN5"].headingControl)

         value = "Phone"

      endwith

      with (columns["COLUMN6"].headingControl)

         value = "Address1"

      endwith

      with (columns["COLUMN7"].headingControl)

         value = "Address2"

      endwith

      with (columns["COLUMN8"].headingControl)

         value = "City"

      endwith

      with (columns["COLUMN9"].headingControl)

         value = "State"

      endwith

      with (columns["COLUMN10"].headingControl)

         value = "Zip"

      endwith

      anchor = 6 // Container

      vScrollBar = 0 // Off

      height = 16.0

      left = 0.0

      top = 0.0

      width = 64.0

   endwith

   this.rowset = this.customers1.rowset

   function GRID1_onGotFocus

      form.interceptPageKeys()

      return

   function GRID1_onLostFocus

      form.releasePageKeys()

      return

   function interceptPageKeys

       on key label PgDn do EatPageKey

       on key label PgUp do EatPageKey

      return

   function releasePageKeys

       on key label PgDn

       on key label PgUp

      return

endclass

Procedure EatPageKey

return False