Jump to content


Photo

Multiselect problem

nextdbgrid bug

  • Please log in to reply
8 replies to this topic

#1 raizalnapi

raizalnapi
  • Members
  • 4 posts
  • Gender:Male
  • Location:Surabaya,Jawa Timur,Indonesia
  • Interests:i like to learn new things...
    n i love programming :v

Posted 17 November 2011 - 10:27 AM

i have a problem with nextdbgrid.
when i select row using shift+down arrow key , it's not selected...
i trying to test it in new project , it doesn't have any problem... it can selected with shift+down arrow or up arrow key
i'm trying to solved it in keydown event , but it doesn't has any effect...
i think there's something wrong with row selecting when on selecting by using shift+down arrow key...
anyone can solve this problem??


sorry for my bad english...
Try to learn new things by trying
by ~Noob~

#2 cezar

cezar
  • Members
  • 34 posts
  • Gender:Male

Posted 17 November 2011 - 05:40 PM

Have you switched on "Multiselect"? :)

Click on Grid, then choose from object inspector (on the left side) the "Options" menu and then click on "goMultiSelect" - should help! ;)

Cezar

#3 raizalnapi

raizalnapi
  • Members
  • 4 posts
  • Gender:Male
  • Location:Surabaya,Jawa Timur,Indonesia
  • Interests:i like to learn new things...
    n i love programming :v

Posted 18 November 2011 - 04:42 AM

Have you switched on "Multiselect"? :)

Click on Grid, then choose from object inspector (on the left side) the "Options" menu and then click on "goMultiSelect" - should help! ;)

Cezar


of course...
i already choose that option to true...
i already said that...when i use shift+up arrow key it can selected...that mean i already swith multiselect to true ==a
but when i use shift+down arrow key , it can't be selected....
get it sir?
i think no one ever have this problem =o=
Try to learn new things by trying
by ~Noob~

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 18 November 2011 - 06:39 AM

Hi,

I will check this now. Thank you
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.

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 18 November 2011 - 09:35 AM

Hi,

Just checked it now and it work fine. Maybe someone else may check it too. Maybe I have already fixed it. New release will be out in 2 days so you may check it again.

Thank you for reporting.
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.

#6 raizalnapi

raizalnapi
  • Members
  • 4 posts
  • Gender:Male
  • Location:Surabaya,Jawa Timur,Indonesia
  • Interests:i like to learn new things...
    n i love programming :v

Posted 18 November 2011 - 11:39 AM

thanks...
i'll wait it...
Try to learn new things by trying
by ~Noob~

#7 cezar

cezar
  • Members
  • 34 posts
  • Gender:Male

Posted 19 November 2011 - 09:13 PM

Selecting record with Alt-DownArrow works fine, same as Alt-UpArrow. Tested on DelphiXE on WIndowsXP. raizalnapi, maybe the problem is with your operating system? May be the Alt-DownArrow has been caught by some other software which works in your system?

#8 raizalnapi

raizalnapi
  • Members
  • 4 posts
  • Gender:Male
  • Location:Surabaya,Jawa Timur,Indonesia
  • Interests:i like to learn new things...
    n i love programming :v

Posted 22 November 2011 - 07:10 AM

No. it's pure nextdbgrid select problem...
i already tried to select a row just using down arrow key in keydown event but it's now working too

i already install the new update component and it's now working XD
yey~
thanks Boki
Try to learn new things by trying
by ~Noob~

#9 tdesc

tdesc
  • Members
  • 2 posts

Posted 29 December 2014 - 12:33 AM

Assuming it's the same problem, for me this is broken again with NextDBGrid v5.10.40 under Delphi 2010. When doBufferRecords is set, it works correctly, but when it isn't, holding Shift + Arrow Down does not select the rows that initially were not in view are not selected, until I press Arrow Up once.
 
I came up with this workaround, but it stutters a bit.
procedure SelectGridRowsFromFirstSelectedDownToCurrent(const AGrid: TNxCustomGrid);
var
  LRow: Integer;
begin
  LRow := AGrid.SelectedRow;
  while (LRow >= 0) and not AGrid.Selected[LRow] do
  begin
    AGrid.SelectCell(AGrid.SelectedColumn, LRow, [ssShift]);
    Dec(LRow);
  end;
end;
 
procedure TForm1.NextDBGrid1VerticalScroll(Sender: TObject; Position: Integer);
var
  LScrolledDown: Boolean;
  LShiftPressed: Boolean;
  LArrowDownPressed: Boolean;
begin
  LScrolledDown := Position > 0;
  LShiftPressed := GetKeyState(VK_SHIFT) < 0;
  LArrowDownPressed := GetKeyState(VK_DOWN) < 0;
  if LScrolledDown and LShiftPressed and LArrowDownPressed then
  begin
    SelectGridRowsFromFirstSelectedDownToCurrent(Sender as TNxCustomGrid);
    Refresh;
  end
end;
Another problem is that when holding the Up Arrow somewhere further down the list, not even holding the Shift key, rows that were out of view (from the top) are selected...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users