Maintain Scroll position in grid on Call Back

Answered (Verified) This post has 1 verified answer and 5 replies

Not Ranked
Posts: 7
ArnoldSamuel Posted: Tue Apr 10, 2012 @ 10:53 PM
Hi All,

I have to retain scroll postion in the grid on call back.

Requirement:

Its an action item grid in which Double Click on any row, the control moves to a new page where I can approve/reject/pending.
On action complete, control comes back to old page.

If selected record found then it has to be highlighted and scroll position has to be maintained.
If selected record not found then previous record has to be highlighted and scroll position has to be maintained


I'm hold the selected row index,data key value in session.
Please help me....

Regards,
Samuel

 

Answered (Verified) Verified Answer

Top 10 Contributor
Posts: 908
Answered (Verified) ajay Posted: Wed Apr 11, 2012 @ 8:36 AM
Verified by ArnoldSamuel

Hello,

 

Thank you for submitting your query with ComponentArt forum.

 

In order to maintain the scrolling position in Grid after callback you need to invoke its scrollto client side method. This method accepts the index number of Grid row and scrolls until that row is displayed at the top of the Grid. You will need to get the session's data in hidden form field in order to be used at client. Please refer the following online help article for the same:

 

http://docs.componentart.com/#UIFramework/2012/ComponentArt.Web.UI.AJAX.client/ComponentArt.Web.UI~Grid_scrollTo_method.htm

 

Please also refer to the following forum link for using the same method:

 

http://www.componentart.com/community/forums/p/60838/97676.aspx#97676

 

Hope it will help you.

 

Thank you.

 

Ajay Mishra

All Replies

Top 10 Contributor
Posts: 908
Answered (Verified) ajay Posted: Wed Apr 11, 2012 @ 8:36 AM
Verified by ArnoldSamuel

Hello,

 

Thank you for submitting your query with ComponentArt forum.

 

In order to maintain the scrolling position in Grid after callback you need to invoke its scrollto client side method. This method accepts the index number of Grid row and scrolls until that row is displayed at the top of the Grid. You will need to get the session's data in hidden form field in order to be used at client. Please refer the following online help article for the same:

 

http://docs.componentart.com/#UIFramework/2012/ComponentArt.Web.UI.AJAX.client/ComponentArt.Web.UI~Grid_scrollTo_method.htm

 

Please also refer to the following forum link for using the same method:

 

http://www.componentart.com/community/forums/p/60838/97676.aspx#97676

 

Hope it will help you.

 

Thank you.

 

Ajay Mishra

Not Ranked
Posts: 7
ArnoldSamuel Posted: Wed Apr 11, 2012 @ 10:23 PM
Thanks for your reply.

I’m trying to achieve is that the grid will scroll down to where the user last clicked and on going with 
Grid.scrollTo() option I facing more issue.
That is my grid size is getting reduced.

say if i double click on the last record and on post back i can see only the last record is visible in the grid.
on moving the scroll bar grid size is back to normal.

help me resolving this issue. 
Not Ranked
Posts: 7
ArnoldSamuel Posted: Thu Apr 12, 2012 @ 1:23 AM
Thanks a lot I fixed it... :)
Top 10 Contributor
Posts: 908
ajay Posted: Thu Apr 12, 2012 @ 4:00 AM

Hello,

 

I am glad your issue is resolved.

 

Thank you.

 

Ajay Mishra

Not Ranked
Posts: 7
ArnoldSamuel Posted: Tue Apr 24, 2012 @ 2:40 AM
Hi Ajay,

I have a scenario here,
In the grid I'm doing a grouping following that expanding a group and double cilck a row  ->control moves to new page-> now after the post back event I have to retain scroll postion, grouping and highlight the selected row(double clicked row).

I have to do this in client side. 

im using sender.selectByKey() for row selecting, sender.scrollTo() for scroll position and sender.group() for grouping. the thing is im not able to expand the group on postback.

Please help me with a working sample.
 
Page 1 of 1 (6 items)