Short summary:
Telerik grid's current page number is not reset when doing search (i.e. data source changes).
Steps to reproduce:
1. Create >= 21 products.
2. Create a category A and bind it to 1 product.
3. Go to any product's Related Products tab, press "Add a new related product".
4. You'll get a grid with all the products listed by default, should be more than 1 page.
5. Click page 2 (or greater) => some products are shown.
6. In the category drop down select category A, press "Search".
Actual result: You get "No records to display" message.
Expected result: grid shows 1 product from category A.
Notes:
1. I suppose this behavior can be reproduced on other pages with grids (at least it can be reproduced at Products tab of a category edit page).
My quick solution:
File RelatedProductAddPopup.cshtml.
$(document).ready(function () {
$('#search-products').click(function () {
var grid = $('#products-grid').data('tGrid');
grid.currentPage = 1; // Added this line
grid.ajaxRequest();
return false;
});
});