Susanna Wiedemann
Top achievements
Rank 2
Susanna Wiedemann
asked on 19 Aug 2009, 12:00 PM
Dear all
I created a grid and added a separate search field outside this grid. The paging within the grid is activated. Everything is working fine, but I have a very strange problem.
When I do a search where more than one page is showed and moved to one of the next pages (e.g. page 5) and I run another search with more than 5 pages, the actual page won't change to the first one (still page 5 is activated).
I have this problem only with the selfmade search-field. And the search itself is working fine.
Has anybody an idea what to do?
Thanks a lot for your help
Marino
I created a grid and added a separate search field outside this grid. The paging within the grid is activated. Everything is working fine, but I have a very strange problem.
When I do a search where more than one page is showed and moved to one of the next pages (e.g. page 5) and I run another search with more than 5 pages, the actual page won't change to the first one (still page 5 is activated).
I have this problem only with the selfmade search-field. And the search itself is working fine.
Has anybody an idea what to do?
Thanks a lot for your help
Marino
4 Answers, 1 is accepted
0
Accepted
Hi Marino,
You may need to reset the grid page index - RadGrid1.CurrentPageIndex = 0.
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You may need to reset the grid page index - RadGrid1.CurrentPageIndex = 0.
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Susanna Wiedemann
Top achievements
Rank 2
answered on 19 Aug 2009, 03:00 PM
Hi Vlad
Thanks for the hint.... It's working half of the times now.
e.g.:
- i change to page 4
- i enter something in the search field ("18") and search (by pressing a search button) for it
--> it doesn't change to page 1
- i press the search button again, without changing anything
--> it jumps to the first page
code:
Thanks for the hint.... It's working half of the times now.
e.g.:
- i change to page 4
- i enter something in the search field ("18") and search (by pressing a search button) for it
--> it doesn't change to page 1
- i press the search button again, without changing anything
--> it jumps to the first page
code:
| Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSearch.Click |
| RadGrid1.Rebind() |
| RadGrid1.CurrentPageIndex = 0 |
| End Sub |
| Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource |
| Dim myLMFList As List(Of v_LMF) |
| If txtSearch.Text = "" Then |
| myLMFList = Controller.LoadAll |
| RadGrid1.DataSource = myLMFList |
| Else |
| 'search in all depots by textbox entry |
| myLMFList = Controller.FindAll(txtSearch.Text, drpSearch.Text) |
| RadGrid1.DataSource = myLMFList |
| End If |
| End Sub |
Is there something more I need to add?
Thanks a lot for your help
Marino
0
Accepted
Hello Marino,
Can you please try to set this before Rebind() call and let me know about the result?
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Can you please try to set this before Rebind() call and let me know about the result?
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Susanna Wiedemann
Top achievements
Rank 2
answered on 19 Aug 2009, 03:06 PM
Hi Vlad
It is working, if I reset the page index before the rebind().
Thanks a lot for your help
Marino
It is working, if I reset the page index before the rebind().
Thanks a lot for your help
Marino
