Jump to content


Photo

nextgrid, cursor keys home/end orientation preference


  • Please log in to reply
3 replies to this topic

#1 d6user

d6user
  • Members
  • 94 posts

Posted 20 September 2012 - 03:09 AM

hi boki

i'm not sure if this would require a lot of re-working into the component. but i thought i would ask since i work in a lot of ms access databases, the table during viewing, and not having this feature in the nextgrids makes things fustrating at times since i've been using these features for years.

nextgird functionality:
currently, in nextgrid, when you press the Home key, the rowselector goes to the First record, and when you press the End key the rowselector goes to the very Last record. however, there is no feature to have the rowselector (when set to individual cells--for editing purposes) (or, cell selector) to go either First column or Last column in selected row.

ms access functionality:
in ms access, while in table view, pressing ctrl+up or ctrl+down keys will bring the rowselector to the top of the First or Last row's record. and, when you want to travel left/right within the selected row, (cell editing), pressing the Home or End keys bring the cell selector to the First column or Last column. this helps me to move quickly to a column and make quick editing in the tables or viewing query results.

is there a flag you could add in the nextgrids properties ?, like opAccess and opNextGrid for instance.

would you consider adding this feature into the nextgrid / nextDBgrid component ?

thank you.

#2 RonnyH

RonnyH
  • Members
  • 29 posts
  • Gender:Male

Posted 23 August 2013 - 05:19 PM

This problem has always annoyed me. I would like to jump in edit mode with the home button at the top of the cell, but jump on the first line.
I have a suggestion for solving this problem:

in file NxDBGrid.pas:
	 VK_HOME: SendMessage(Handle, WM_VSCROLL, SB_TOP, 0);
	 VK_END: SendMessage(Handle, WM_VSCROLL, SB_BOTTOM, 0);
change to
	 VK_HOME:
	 begin
		 if not FDataLink.Editing then SendMessage(Handle, WM_VSCROLL, SB_TOP, 0);
	 end;
	 VK_END:
	 begin
		 if not FDataLink.Editing then SendMessage(Handle, WM_VSCROLL, SB_BOTTOM, 0);
	 end
Please boki, you can change the source code or insert another option like "goAlternatePosKey"?

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,214 posts
  • Gender:Male

Posted 24 August 2013 - 10:01 AM

Hello Ronny,

Added something like this:


      VK_HOME:
        if not ((gtEdit in GridState)
            or (gtInput in GridState))
          then SendMessage(Handle, WM_VSCROLL, SB_TOP, 0);
          
      VK_END:
        if not ((gtEdit in GridState)
            or (gtInput in GridState))
          then SendMessage(Handle, WM_VSCROLL, SB_BOTTOM, 0);

I hope that this is fine too.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#4 RonnyH

RonnyH
  • Members
  • 29 posts
  • Gender:Male

Posted 24 August 2013 - 10:10 AM

Exactly what I wanted :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users