Jump to content


Photo

How to use Multiselect without Rowselect ?


  • Please log in to reply
2 replies to this topic

#1 rond

rond
  • Members
  • 50 posts
  • Location:Lieshout, The Netherlands

Posted 24 February 2011 - 05:17 PM

Is there a way to use multi-select in the grid without having to set RowSelect ?
I could do this in the Delphi grid.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 02 March 2011 - 02:24 AM

Hello Rond,

Please sorry, I don't understand. Can you give me more details. Thank you.

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 rond

rond
  • Members
  • 50 posts
  • Location:Lieshout, The Netherlands

Posted 02 March 2011 - 10:43 AM

QUOTE (Boki (Berg) @ Mar 2 2011, 02:24 AM) <{POST_SNAPBACK}>
Hello Rond,

Please sorry, I don't understand. Can you give me more details. Thank you.

Best regards


I have a grid in which the user can edit all cells.
However the user must also select which multiple rows (goMultiSelect) he'd like to copy to another part of the dialog.
In order to do this I need to see which rows he has selected.
Unfortunately there appears to be no way to do this without enabling 'goSelectFullRow' in your grid.
With 'rowselect' enabled I can't edit any of the cells any more.

CODE

...
procedure TNxCustomGridControl.SelectCell;
var
OldCol, OldRow, i: Integer;
CanSelect: Boolean;
begin
...
if GetRowCount = 0 then Exit;

if goSelectFullRow in Options then // replacing this with 'if true then' appears to enable multiselect
// if True then
begin



See attached screenshot for example after I modified your code.

Attached Files






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users