How do I disable sorting on a NextGrid ? (So that clicking the header doesn't filter A-Z/Z-A anymore
NextGrid Disable Sorting
Started by Afiag, Jan 11 2006 03:08 PM
5 replies to this topic
#1
Posted 11 January 2006 - 03:08 PM
#2
Posted 11 January 2006 - 04:07 PM
Hi
Have you tried to set coCanSort to false in each unsortable column's options?
Have you tried to set coCanSort to false in each unsortable column's options?
G.W. van der Vegt
#3
Posted 11 January 2006 - 04:20 PM
Thanks
#4
Posted 08 September 2009 - 04:08 PM
Is there a way to disable sorting on the entire grid, instead of just disable sorting for each column?
And is there a way to set options more efficiently than eg.
Thank you.
CODE
With Frame31.NextGrid1 do begin
//How to disable sorting?
Columns.Add(TNxTextColumn,'SQL');
Columns[0].Options := Columns[0].Options - [coCanSort];
Columns.Add(TNxTextColumn,'Paramètre');
Columns[1].Options := Columns[1].Options - [coCanSort];
Columns.Add(TNxTextColumn,'Valeur');
Columns[2].Options := Columns[2].Options - [coCanSort];
end;
//How to disable sorting?
Columns.Add(TNxTextColumn,'SQL');
Columns[0].Options := Columns[0].Options - [coCanSort];
Columns.Add(TNxTextColumn,'Paramètre');
Columns[1].Options := Columns[1].Options - [coCanSort];
Columns.Add(TNxTextColumn,'Valeur');
Columns[2].Options := Columns[2].Options - [coCanSort];
end;
And is there a way to set options more efficiently than eg.
CODE
Columns[0].Options := Columns[0].Options - [coCanSort];
Columns[0].Options := Columns[0].Options + [coFixedSize];
Columns[0].Options := Columns[0].Options + [coFixedSize];
Thank you.
#5
Posted 08 September 2009 - 05:26 PM
Hello Fred,
Unfortunatelly, this option doesn't exist. Only way is to you write small for loop and add/remove coCanSort flag from all columns.
If you don't know how to write it, I may help.
Best regards
Unfortunatelly, this option doesn't exist. Only way is to you write small for loop and add/remove coCanSort flag from all columns.
If you don't know how to write it, I may help.
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.
--
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
Posted 08 September 2009 - 07:23 PM
It's OK, I was already using a loop. I was checking to see if there were a shorter way to disable sorting on all columns.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users