Hi Boki, i am have a suggestion on FindText (in the post http://www.bergsoft....?showtopic=1571 you show this code:
function FindText(const Index: Integer; S: WideString;
Options: TSearchOptions = [soCaseInsensitive, soFromSelected]): Boolean;
..
function TNxCustomGrid.FindText(const Index: Integer; S: WideString;
Options: TSearchOptions): Boolean;
begin
Result := False;
if RowCount = 0 then Exit;
if soFromSelected in Options then
begin
Result := Locate(Index, SelectedRow + 1, RowCount - 1, S, Options);
if not Result and (soContinueFromTop in Options) then Locate(Index, 0, RowCount - 1, S, Options);
end else Result := Locate(Index, 0, RowCount - 1, S, Options);
end;
why a boolean result?
why not a integer?
is better because, i can use something like that:
if Ng.FindText(2,'20656565656',[soCaseInsensitive, soFromSelected]) >-1 then //-1 not found
Messagedlg('the value is found on the row: '+inttostR(Ng.FindText(2,'20656565656',[soCaseInsensitive, soFromSelected])), mtwarning,[mbok],0);
Thks
suggestion of FindText
Started by jamiguel77, Jan 09 2012 09:40 AM
10 replies to this topic
#1
Posted 09 January 2012 - 09:40 AM
#2
Posted 10 January 2012 - 12:55 AM
Hi,
Unfortunately, this can't be changed since this method is already used by other users.
Maybe I will introduce override method to cover this.
Unfortunately, this can't be changed since this method is already used by other users.
Maybe I will introduce override method to cover this.
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.
#3
Posted 10 January 2012 - 04:06 PM
Hi,
I have added LastFoundRow property which may be used to inspect index of last found row.
Best regards
I have added LastFoundRow property which may be used to inspect index of last found row.
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.
#4
Posted 15 April 2013 - 05:02 PM
Hi Boki, just wondering if this was only added to paid version?? (Lastfoundrow)
I'm checking out nextgrid freeware version for Delphi7 and filtering large amount of records makes grid somehow slow in response/painting.. I have tried alternative method before ver6 relase but it utilises lastfoundrow.. please advise, thank you
I'm checking out nextgrid freeware version for Delphi7 and filtering large amount of records makes grid somehow slow in response/painting.. I have tried alternative method before ver6 relase but it utilises lastfoundrow.. please advise, thank you
#5
Posted 15 April 2013 - 06:11 PM
Hello Jacom,
It should be added. Also, don't forget to call BeginUpdate/EndUpdate around critical code.
It should be added. Also, don't forget to call BeginUpdate/EndUpdate around critical code.
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 15 April 2013 - 07:20 PM
Hi Boki,
Thank you for quick reply.
I'm afraid I'm not able to use LastFoundRow property..with freeware version of Nextgrid 5.8.5.
When trying Eikcam example;
...
While nxUSGrid.FindText(nxUSGrid.ColumnByName['colUSText'].Index, txtSearch.Text, SearchOptions) do
begin
nxUSGrid.RowVisible[nxUSGrid.LastFoundRow] := True;
end;...
Delphi 7 cannot recognize 'LastFoundRow'.
Am I missing something? I have just installed Nextgrid from executable available in downloads... Do I have to perform additional steps to get this working full on ?
Also when using ColumnByName['colUSText'] property ... compiler return error file missing 'columns.pas' I think.. or smth similar.. Not sure whats wrong but can't quite get Nextgrid to work properly... but so far it looks like great grid..
whats surprises me with filtering though is: when all rows are visible 40,000 + grid works very fast but as soon as I perform filtering and grid display only few rows... everything freezes.. for sec or two.. even when moving mouse over column header, highlight only appears after short delay.. same when selecting cells.. it lags a bit... strange.. Invisible rows seems to make nextgrid somehow slower.. anyway that's a reason I was trying use Eikcam alternative filtering.
please let me know if there are some extra installation steps required, Thanks!
Thank you for quick reply.
I'm afraid I'm not able to use LastFoundRow property..with freeware version of Nextgrid 5.8.5.
When trying Eikcam example;
...
While nxUSGrid.FindText(nxUSGrid.ColumnByName['colUSText'].Index, txtSearch.Text, SearchOptions) do
begin
nxUSGrid.RowVisible[nxUSGrid.LastFoundRow] := True;
end;...
Delphi 7 cannot recognize 'LastFoundRow'.
Am I missing something? I have just installed Nextgrid from executable available in downloads... Do I have to perform additional steps to get this working full on ?
Also when using ColumnByName['colUSText'] property ... compiler return error file missing 'columns.pas' I think.. or smth similar.. Not sure whats wrong but can't quite get Nextgrid to work properly... but so far it looks like great grid..
whats surprises me with filtering though is: when all rows are visible 40,000 + grid works very fast but as soon as I perform filtering and grid display only few rows... everything freezes.. for sec or two.. even when moving mouse over column header, highlight only appears after short delay.. same when selecting cells.. it lags a bit... strange.. Invisible rows seems to make nextgrid somehow slower.. anyway that's a reason I was trying use Eikcam alternative filtering.
please let me know if there are some extra installation steps required, Thanks!
#7
Posted 15 April 2013 - 08:42 PM
Hi,
Don't know why you can not find it, it is inside public section.
Can you please send me small demo project where this slowdown occur. Maybe I can speed it up.
Don't know why you can not find it, it is inside public section.
property LastFoundRow: Integer read FLastFoundRow;
Can you please send me small demo project where this slowdown occur. Maybe I can speed it up.
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.
#8
Posted 15 April 2013 - 08:43 PM
ps. you will maybe need to add to the Library Path path to the Sources\Next Grid\
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.
#9
Posted 16 April 2013 - 11:54 AM
Hi Boki,
I've got 'Sources\Next Grid\' in library path as it was automatically added during installation..
That's list of all available properties strarting with 'L':
NextGrid1.LastAddedRow;
NextGrid1.LoadFromIni();
NextGrid1.LoadFromRegistry();
NextGrid1.LoadFromStream();
NextGrid1.LoadFromTextFile();
NextGrid1.LastRow;
NextGrid1.LastVisibleRow;
NextGrid1.LRDockWidth;
NextGrid1.Left;
Also I have searched Berg folder for files containing 'LastFounRow' and search only return following files:
"c:\Program Files\Berg\Next Grid\History.txt"
"c:\Program Files\Berg\Next Grid\Sources\Next Grid\NxCustomGrid.dcu"
Is it possible some old file were compiled into executable installation file?
I would upload example with slowdown but not shure how to attach file on this forum .. need anothor coffee I think
I've got 'Sources\Next Grid\' in library path as it was automatically added during installation..
That's list of all available properties strarting with 'L':
NextGrid1.LastAddedRow;
NextGrid1.LoadFromIni();
NextGrid1.LoadFromRegistry();
NextGrid1.LoadFromStream();
NextGrid1.LoadFromTextFile();
NextGrid1.LastRow;
NextGrid1.LastVisibleRow;
NextGrid1.LRDockWidth;
NextGrid1.Left;
Also I have searched Berg folder for files containing 'LastFounRow' and search only return following files:
"c:\Program Files\Berg\Next Grid\History.txt"
"c:\Program Files\Berg\Next Grid\Sources\Next Grid\NxCustomGrid.dcu"
Is it possible some old file were compiled into executable installation file?
I would upload example with slowdown but not shure how to attach file on this forum .. need anothor coffee I think
#10
Posted 17 April 2013 - 01:25 AM
Hello,
Hm. Most probably some old dcu file is in path and that it made a conflict.
I suggest that you do a global search for Nx*.* and delete additional files.
Hm. Most probably some old dcu file is in path and that it made a conflict.
I suggest that you do a global search for Nx*.* and delete additional files.
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.
#11
Posted 17 April 2013 - 09:59 AM
You are a star!!! That's exactly what happened.. Looks like I had installed NextGrid while ago and never had go at it... I found some old files in main delphi library which where interfering with new version.. removed them and all is working great now... Even slowdown dissapeared so I don't have to really use "LastFoundRow" now, quite ironic..
Thank you Boki!
Thank you Boki!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users