EasyUI Forum
September 14, 2025, 01:59:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Server side datagrid - incorret rownumber on: November 14, 2014, 12:50:39 PM
I know rownumber is there and gets initialed with rownumbers:true defined in data-options.

well i was going to a different page and from there i am supposed to return on the same page on the datagrid page.

Well i resolved this after reading many topics on the forum. here to the way to correct the rownumbers

$(document).ready(function () {
      var opts = $('#tt').datagrid('options');
      var pager = $('#tt').datagrid('getPager');
      if(pgNum.value!='' && pgSize.value!='' ){ // pgNum and pgSize hidden variable tell the which page i am and row count respectively.
            opts.pageNumber = pgNum.value;
         opts.pageSize = pgSize.value;
         pager.pagination({
                 pageNumber:pgNum.value,
               showPageList:false
         });
      }
   });
2  General Category / EasyUI for jQuery / Server side datagrid - incorret rownumber on: November 13, 2014, 12:16:53 PM
Hi, I implemented a Server side easyui-datagrid and everything looks fine except the rownumbers.

my server side java code populates the right data into the grid and using following code, i correct the pagination.

   $(document).ready(function () {
      var pager = $('#tt').datagrid('getPager');
      if(pgNum.value!=''  ){ // pgNum hidden variable tell the which page i am
         pager.pagination({
                 pageNumber:pgNum.value,
               showPageList:false
         });
   });

Now because of rownumbers:true defined in data-options, pagination initializes the row numbers.

So although i am on a 3rd (or some other) page and data and pagination showing right numbers, rownumbers are still 1,2,3,......if i click on refresh button, it correct them.

Could some jquery expert can help me to correct the  problem. I am mainly a java develioper and trying jquery first time.

Thank you,

Vilish

now since
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!