Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: IWDBGrid ScrollToCurrentRow


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Oct 1, 2017 11:50 AM Last Post By: Chad Hower
Carlos Matos

Posts: 111
Registered: 6/25/01
IWDBGrid ScrollToCurrentRow  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2017 8:35 AM
I would like to know what does IWDBGrid ScrollToCurrentRow property when is it set to True?
Thanks
Eitan Arbel

Posts: 446
Registered: 2/24/13
Re: IWDBGrid ScrollToCurrentRow  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 23, 2017 12:30 PM   in response to: Carlos Matos in response to: Carlos Matos
it will take the page to show you the "CurrentRow" .

for example :
if you have a grid with 300 rows, and it will very long (outside the visual scope of the browser), then the browser will take you "down" to the last row - the most bottom row that was drawn by the grid.
the most bottom row that was drawn by the grid, is also the current row by default (unless you change the Current Row or record)

i hope i said it right, sorry for my english...
Carlos Matos

Posts: 111
Registered: 6/25/01
Re: IWDBGrid ScrollToCurrentRow  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 25, 2017 2:27 AM   in response to: Eitan Arbel in response to: Eitan Arbel
Eitan Arbel wrote:
it will take the page to show you the "CurrentRow" .

for example :
if you have a grid with 300 rows, and it will very long (outside the visual scope of the browser), then the browser will take you "down" to the last row - the most bottom row that was drawn by the grid.
the most bottom row that was drawn by the grid, is also the current row by default (unless you change the Current Row or record)

i hope i said it right, sorry for my english...
And how do I position on the dataset on a certain row that I click?
Chad Hower

Posts: 525
Registered: 3/2/07
Re: IWDBGrid ScrollToCurrentRow  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 28, 2017 5:23 PM   in response to: Carlos Matos in response to: Carlos Matos
On 9/25/2017 5:27 AM, Carlos Matos wrote:
i hope i said it right, sorry for my english...
And how do I position on the dataset on a certain row that I click?

Check the fishfact demo for such an example.
Carlos Matos

Posts: 111
Registered: 6/25/01
Re: IWDBGrid ScrollToCurrentRow  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2017 3:30 AM   in response to: Chad Hower in response to: Chad Hower
Chad Hower wrote:
On 9/25/2017 5:27 AM, Carlos Matos wrote:
i hope i said it right, sorry for my english...
And how do I position on the dataset on a certain row that I click?

Check the fishfact demo for such an example.
Where can I find that example?
Eitan Arbel

Posts: 446
Registered: 2/24/13
Re: IWDBGrid ScrollToCurrentRow  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2017 6:19 AM   in response to: Carlos Matos in response to: Carlos Matos
sorry for the delay...

And how do I position on the dataset on a certain row that I click?
to build your columns, you double-click the Columns property and the "Editing IWGrid1.Columns" (or what ever you named the grid) will open up, right?
so for every column you can set it's OnClick event that will handle the specific field you choose.
you can also direct all the fields to use the same OnClick event.
so far so good, and i'm sure you already know that.

now, after you directed all the fields to use the same OnClick event, if you set the IWDBGrid.RowClick:=True, then a click on any field will use the same OnClick event.

so far, that doesn't directly answer you question, but...
clicking a row (and also a field) on IWDBGrid will actually position the dataset's pointer to the row\record you are working on, and that is the "CurrentRow".
(if the DataSet is opened and connected to the IWDBGrid of course...)

the last record that the Table or Query read, is the "CurrentRow", but you can also get there with a Bookmark and Locate

personally i don't use the ScrollToCurrentRow property, because i want to stay at the top of the visual scope of the browser.

as for the examples, here they are :
https://github.com/Atozed/IntraWeb

Chad Hower

Posts: 525
Registered: 3/2/07
Re: IWDBGrid ScrollToCurrentRow  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2017 11:50 AM   in response to: Carlos Matos in response to: Carlos Matos
On 9/29/2017 6:30 AM, Carlos Matos wrote:
Check the fishfact demo for such an example.
Where can I find that example?

Its in the demos under IW 12. Im checking to see why it was not moved to
14, but the concept should be the same.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02