Jump to content


Photo

How to unselect


  • Please log in to reply
3 replies to this topic

#1 bertrod

bertrod
  • Members
  • 101 posts
  • Gender:Male
  • Location:Switzerland

Posted 06 July 2006 - 06:01 PM

How can I unselect all rows ? I tried to set the nextgrid.selectedrow := -1, but then I have an error when i click on the grid : "ListIndex Out of bound(-1)" huh.gif

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 July 2006 - 08:36 PM

Hello,

You need to set Selected[RowIndex] for all rows to False.

Example:

CODE
for i := 0 to NextGrid1.RowCount - 1 do
  NextGrid1.Selected[i] := False;


Hope that this help smile.gif

regards
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 bertrod

bertrod
  • Members
  • 101 posts
  • Gender:Male
  • Location:Switzerland

Posted 11 July 2006 - 12:40 PM

Hey, thanks but it didn't really help me. I could finally manage the problem by modifying the source code of the NextGrid to stop the bodyMouseDown procedure if the selectedIndex = -1. It works fine now.

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 11 July 2006 - 10:57 PM

Hello,

Maybe this will cause other problems. Can you please tell me more details about your sample code.

regards
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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users