Jump to content


Photo

Different between ClearSelection and NoSelection?


  • Please log in to reply
2 replies to this topic

#1 littlebigfred

littlebigfred
  • Members
  • 176 posts

Posted 06 October 2009 - 05:02 PM

Hello

Both seem to do the same thing, namely remove the focus from a selected cell. What is the difference between the two methods?

CODE
With NextGrid1 do begin
    if SelectedColumn = ColumnByName['value'].Index then begin
        //NoSelection;
        ClearSelection;
    end;
end;


Thank you.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 October 2009 - 05:45 PM

Hello Fred,

ClearSelection - It clears multi-selected selection (deselect all).

NoSelection - Call ClearSelection and also set SelectedRow to -1 and SelectedRow to 0.

I hope that this helps smile.gif

Best 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 littlebigfred

littlebigfred
  • Members
  • 176 posts

Posted 06 October 2009 - 06:18 PM

Thanks for the clarification.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users