Jump to content


Photo

OnRowMove problem


  • Please log in to reply
5 replies to this topic

#1 4rc

4rc
  • Members
  • 7 posts

Posted 19 November 2008 - 08:17 PM

Hi,

I want to reorder two records in the OnRowMove event. But I have no glue how to achieve it with the provided FromPos/ToPos integer parameters, because there isn't a Rows[] property. These parameters are kind of useless IMO.
How can I access the rows involved in the RowMove process?

Cheers,
r4c;

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,977 posts
  • Gender:Male

Posted 22 November 2008 - 08:53 PM

Hello,

Rows[x] property is just added in 1 release ago.

I hope that it will help.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 4rc

4rc
  • Members
  • 7 posts

Posted 01 December 2008 - 03:50 PM

QUOTE (Boki (Berg) @ Nov 22 2008, 08:53 PM) <{POST_SNAPBACK}>
Hello,

Rows[x] property is just added in 1 release ago.

I hope that it will help.

Best regards


Hi Boki,

I have installed nextcomps_41081.zip, but there is no TDBNextGrid.Rows property!
Furthermore the version.pas states "strNextSuiteVer = '4.9.8.1'" and "strNextGridVer = '4.6'", and history.txt:
Sep 25 2008
-----------
NextGrid v4.6
Looks like the nextcomps_41081.zip isn't up to date!

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,977 posts
  • Gender:Male

Posted 01 December 2008 - 04:06 PM

Hello 4rc,

Try to add next code in NextGrid (NxGrid.pas file)

CODE
public
    property Row[Index: Integer]: TRow read GetRow;
...

implementation

...
function TNextGrid.GetRow(Index: Integer): TRow;
begin
  Result := FCells.Row[Index];
end;


I hope that this helps

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 4rc

4rc
  • Members
  • 7 posts

Posted 01 December 2008 - 09:04 PM

QUOTE (Boki (Berg) @ Dec 1 2008, 04:06 PM) <{POST_SNAPBACK}>
Hello 4rc,

Try to add next code in NextGrid (NxGrid.pas file)

I hope that this helps

Best regards


nice try, but this won't help, because I'm talking about TdbNextGrid. (TNextGrid already has the Row[s] property!)

Best regards

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,977 posts
  • Gender:Male

Posted 02 December 2008 - 12:19 AM

Hello,

Oh I see, NextDBGrid doesn't have Rows property and only way is to do it manually.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users