I used custom search in jqgrid whenever i search a text by scrolling end of page,the data is not displayed in jqgrid

I scroll to the end of page using custom scrollbar then when i search for text data is not displayed its because of custom scrollbar if i remove the code then it works fine but i don’t know whats the problem

on grid completion event i added a code of jscrollpane as shown

  var table_header = $(‘#container’).find(‘.ui-jqgrid-hbox’).css("position", "relative");
                    $(‘#container’).find(‘.ui-jqgrid-bdiv’).bind(‘jsp-scroll-x’, function (event, scrollPositionX, isAtLeft, isAtRight) {
                        table_header.css(‘right’, scrollPositionX);
                        showArrows: true,
                        horizontalDragMaxWidth: 30,
                        verticalDragMaxHeight: 30,
                        autoReinitialise: true

If i scroll to quarter of page and  search for text assume in controller i have sent json 8 rows of data to display in jqgrid  it shows some 7 rows,again if i scroll downwards and search it reduces by 1 at end of page when i scroll it becomes empty

But in controller code no problem in searching for text its the problem with jscrollpane,because if i remove the code in grid complete it shows the rows properly with default scrollbar

Example :I scrolled down my mouse wheel so 1 row went top of header then when i search for text it matches 8 rows need to display 8 rows but it is dispalying 8-1row went top i.e 7 rows it displays,same if i again scroll down so 2row went top of header then
when i search it displays 6 rows as same it applies for number of rows it doesnt dispaly finally when 8 rows went top it doesn’t display anything,how shall i solve this

$(document).ready(function () {
$("div").scroll(function () {
if ($(this)[0].scrollHeight – $(this).scrollTop() == $(this).outerHeight()) {
//Bind Jquery grid with Paging

Leave a Reply