You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Selecting only the rows in grid which is currently displayed the the user

3 replies [Last post]
Guest's picture

Hello Everyone,

In my grid the occurance level is 10, totally I have 100 rows , I want to select only the rows displayed in the page currently.

For example: 1 to 10 if the user in page1 here 1-10 should be selected.If the user click the next button and he is in page 4 (41-50),If he clicks the button i want to select only 41 to 50

It is simple whatever he can see currently in the page, I need to select them all

Lepa's picture
User offline. Last seen 2 years 20 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Selecting only the rows in grid which is currently ...

I have wrote a blog post a while back to select rows on a grid. you can find it here

To be honest though, I have not tested if it selects all rows (in your example, from 1 to 100) or if it selects only rows showing on the page. I'm guessing it will select all. Can you test it and report back?

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Sakthi's picture
Sakthi (not verified)
Re: Selecting only the rows in grid which is currently ...

Hello Lepa,

I tested this one. it selects all rows in the grid. it is not selecting whatever we see ín current page.

could you please help.. wat will happen if user selects view hunderd..

Can we rerive the rownumber in grid, whatever displayed in screen?


Nitin's picture
User offline. Last seen 5 years 44 weeks ago. Offline
Joined: 06/30/2008
Posts: 73
Re: Selecting only the rows in grid which is currently ...

This is somewhat similar to what we called chunking.
The number of rows dispalyed in a grid is controlled by occur count.
So you can use that property and select only those numbers of rows alongwith using currentrownumber().
This is required when you are displaying row 10-20.
Currentrownumber will retrun you 10 and occurcount 10 .. then start from 10 and select 1 rows.

Just an idea....