This is a migrated thread and some comments may be shown as answers.

[Solved] Reset horizontal scroll position on new search result?

1 Answer 153 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 14 Mar 2013, 02:43 PM
I have a paged radGrid with SaveScrollPosition="true".  This way if they scroll left/right and page, the horizontal scroll position is saved which is what I want (there is a flicker/refresh where the columns jump left/right but that's another issue for later).

However, If I issue a more refined search and a new result set,  I want to reset the page back to page 1 (I'm setting CurrentPageIndex = 0 which works).  However, I also want move the horizontal postion back to the starting point.  How do I do that.  It seems to be a client-setting but I'm not sure how.

Thanks, Dave

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 15 Mar 2013, 02:06 PM
I think I found the fix (in bold)

grdSearchResult.CurrentPageIndex = 0;
grdSearchResult.ClientSettings.Scrolling.ScrollLeft = "0";

grdSearchResult.DataSource = dst;
grdSearchResult.DataBind(); 

 

 

 

Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or