hi all,
Actually this is related to telerik mvc extension grid.In my telerik grid i have an search text box.i write something in text box and press enter,fire a java script function,from the function i call...ajaxrequest function of grid to rebind the grid for the search.That the simple process.
ok.suppose i am in last page in grid.then i write something in the search textbox and press enter,the search is ok.but the paging is not in correct position.i need to go to the first page in this situation...keypresss enter event is bellow
function ListSearch(keyCode, gridObj)
{
window.CurrentList = gridObj;
var id = '#' + $(gridObj).attr('id');
var searchTxt = $(id + " .watermark-list-search").val();
var searchList = $(id + " .watermark-list-search").attr('listtype');
var filterid = $(id + " .watermark-list-search").attr('filterid');
window.CurrentList.data("tGrid").ajaxRequest({ Name: searchTxt, Data: searchList, id: filterid });
}
i modified the code to include page in ajaxrequest like
window.CurrentList.data("tGrid").ajaxRequest({ Name: searchTxt, Data: searchList, id: filterid,page:1 });
it works i.e getting correct data from database but the current page is wrong and showing wrong status '31 to 60 out of 120 ' instead of '1 to 30 out of 20'
what is the process to make it correct?please let me know
Actually this is related to telerik mvc extension grid.In my telerik grid i have an search text box.i write something in text box and press enter,fire a java script function,from the function i call...ajaxrequest function of grid to rebind the grid for the search.That the simple process.
ok.suppose i am in last page in grid.then i write something in the search textbox and press enter,the search is ok.but the paging is not in correct position.i need to go to the first page in this situation...keypresss enter event is bellow
function ListSearch(keyCode, gridObj)
{
window.CurrentList = gridObj;
var id = '#' + $(gridObj).attr('id');
var searchTxt = $(id + " .watermark-list-search").val();
var searchList = $(id + " .watermark-list-search").attr('listtype');
var filterid = $(id + " .watermark-list-search").attr('filterid');
window.CurrentList.data("tGrid").ajaxRequest({ Name: searchTxt, Data: searchList, id: filterid });
}
i modified the code to include page in ajaxrequest like
window.CurrentList.data("tGrid").ajaxRequest({ Name: searchTxt, Data: searchList, id: filterid,page:1 });
it works i.e getting correct data from database but the current page is wrong and showing wrong status '31 to 60 out of 120 ' instead of '1 to 30 out of 20'
what is the process to make it correct?please let me know