Jump to content


Photo

Disable header click

NextGrid header click disable

  • Please log in to reply
7 replies to this topic

#1 Alex

Alex
  • Members
  • 17 posts

Posted 13 January 2015 - 09:07 PM

I couldn't find how to disable header click, is it possible?



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 14 January 2015 - 01:04 AM

Hello Alex,

 

Set coCanClick in Options property of Column to False.


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 Alex

Alex
  • Members
  • 17 posts

Posted 14 January 2015 - 01:25 AM

Thanks, but Double click is still working =/



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 14 January 2015 - 04:31 PM

Hm, I will check it and fix it.


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 14 January 2015 - 04:33 PM

Tested now and you can not sort, and OnHeaderClick event doesn't work. Is something more that happens?


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 Alex

Alex
  • Members
  • 17 posts

Posted 15 January 2015 - 03:44 AM

CanClick=false

but

 

procedure TForm1.NextGrid1Click(Sender: TObject);
begin
  ShowMessage('Grid-click');
end;
 
procedure TForm1.NextGrid1DblClick(Sender: TObject);
begin
  ShowMessage('Grid-dblclick');
end;

 

but messages are shown when header (double)clicked



#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 15 January 2015 - 05:45 PM

Hi,

 

This are global events for complete grid, they are always occur.

 

You may use this to block some columns, inside OnClick:

 

MyCol := NextGrid1.GetColumnAtPos(Point(X, Y));
if not (coCanClick in MyCol.Options) then Exit;

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.

#8 Alex

Alex
  • Members
  • 17 posts

Posted 16 January 2015 - 02:27 AM

I did it in another way, but thanks anyway :)







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users