Jump to content


Photo

EnterKey does not respond in InsertRow


  • Please log in to reply
3 replies to this topic

#1 cuefejen

cuefejen
  • Members
  • 9 posts
  • Gender:Male
  • Location:Japan

Posted 22 February 2018 - 02:59 PM

Hi,

 

In the InsertRow right under the header caption, AddRow can not be done by pressing EnterKey after input.

 

WantReturns = True

WantTabs = True

ShowInsertRow = True

 

What else setting is necessary?

 

I confirmed that it worked properly in NextGrid v5.

 

Thank You.



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 22 February 2018 - 07:39 PM

Hi,

It is a bug I made. I will fix it now. It will be included in next release.
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.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 22 February 2018 - 07:48 PM

Hi,

If you have time, you can replace next procedure in NxCustomGrid6.pas file

I'm still testing it and I will include fix in next release.

procedure TNxCustomGrid6.KeyDown(var Key: Word; Shift: TShiftState);
begin
  inherited;

  case Key of
    VK_PRIOR..VK_DOWN, VK_RETURN, VK_TAB: FSelectionKey := Key;
  end;

  if Assigned(ActiveView)
    and ActiveView.Enabled then
  case Key of
    VK_F2:
      if InsertSelected then InsertCell(SelectedCol)
      else if HasRows then EditCell(SelectedCol, SelectedRow);
    VK_TAB: TabByColumn(Shift, True);
    VK_RETURN:
    begin
      if Inserting then
      begin
        { AddInsertRow call EndEditing }
        if InsertSelected then AddInsertRow;
      end
      else if Editing then
      begin
        if EndEditing then
          if InsertSelected then AddInsertRow else
            case SelectionDirection of
              sdUp: MoveByRow(-1, Shift);
              sdDown: MoveByRow(1, Shift);
              sdLeft: TabByColumn([ssShift], goTabLeaveControl in Options);
              sdRight: TabByColumn([], goTabLeaveControl in Options);
            end;
      end
      else if SelectionDirection = sdNone then EditCell(SelectedCol, SelectedRow);
    end;
    VK_ESCAPE: EndEditing(False);
    else
    begin
      (ActiveView as INxInteract).KeyDown(Key, Shift);
    end;
  end;
end;

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 cuefejen

cuefejen
  • Members
  • 9 posts
  • Gender:Male
  • Location:Japan

Posted 23 February 2018 - 01:00 PM

Hi Boki,

 

It is solved.
 
Thank you for your quick response.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users