Jump to content


Photo

First, Prior, Last, Next ad visibli row count


  • Please log in to reply
3 replies to this topic

#1 Burhan Cakmak

Burhan Cakmak
  • Members
  • 24 posts

Posted 16 July 2008 - 08:05 PM

Hi Boki,

I using NextGrid and i am grid 158 rows

What using code

NextGrid.First; // Goto First row grid
NextGrid.Last; // Goto Last row grid

NextGrid.Prior; // Goto prior row grid
NextGrid.Next; // Goto next row grid

What code nextGrid ???/

and

ShowMessage(IntToStr(NextGrid1.RowCount)); // this code showwing 158 ok very nice

I am using screen 1024*768 i think what row visibli with nextgrid on screen



Sorry i am bad english

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 16 July 2008 - 08:56 PM

Hello Burhan,

You may use ScrollToRow method.

Row 0:

CODE
ScrollToRow(0);


Last row
CODE
ScrollToRow(NextGrid1.RowCount);


Previous row

CODE
NextGrid1.SelectedRow := NextGrid1.SelectedRow - 1;

or

CODE
NextGrid1.MoveSelectionUp;

Next Row:

CODE
NextGrid1.SelectedRow := NextGrid1.SelectedRow + 1;


or

CODE
NextGrid.MoveSelectionDown;


I hope that this helps smile.gif Please tell me if you need more info.
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 Burhan Cakmak

Burhan Cakmak
  • Members
  • 24 posts

Posted 17 July 2008 - 07:32 PM

Hi
Case ......
10202 : TNextGrid(FindComponent('Grd_Kart')).ScrollToRow(0); //Tbl_TarayiciKart.First;
10203 : TNextGrid(FindComponent('Grd_Kart')).MoveSelectionUp; //Tbl_TarayiciKart.Prior;
10204 : TNextGrid(FindComponent('Grd_Kart')).MoveSelectionDown; //Tbl_TarayiciKart.Next;
10205 : TNextGrid(FindComponent('Grd_Kart')).ScrollToRow(TNextGrid(FindComponent('Grd_Kart')).RowCount); //Tbl_TarayiciKart.Last;

....


It is method runnig very nice

10203 : TNextGrid(FindComponent('Grd_Kart')).MoveSelectionUp; //Tbl_TarayiciKart.Prior;
10204 : TNextGrid(FindComponent('Grd_Kart')).MoveSelectionDown; //Tbl_TarayiciKart.Next;



It is code note running

10202 : TNextGrid(FindComponent('Grd_Kart')).ScrollToRow(0); //Tbl_TarayiciKart.First;
10205 : TNextGrid(FindComponent('Grd_Kart')).ScrollToRow(TNextGrid(FindComponent('Grd_Kart')).RowCount); //Tbl_TarayiciKart.Last;


thanks

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 17 July 2008 - 07:38 PM

Hello Burhan,

I am sorry for not understanding smile.gif

Maybe calling together

CODE
NextGrid1.ScrollToRow(0);
NextGrid1.SelectedRow := 0;


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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users