Ajax not work for table record when implement paging

Hi everybody

I'm doing implement display data get from DB but when paging it can't reload table record,I don't know what is happen for it because when debug it return correct data 

Somebody can help me resolve it,please!

Thanks

Hi tung,

1. Did you set StartIndex of your table 

2.Did you set all navigation properties properly



Hope this will help you.


Regards ,
Amreen

Amreen Shaikh wrote:

Hi tung,

1. Did you set StartIndex of your table 

2.Did you set all navigation properties properly



Hope this will help you.


Regards ,
Amreen

Thanks

I have set all properties, my problem is ajax seems reload table but data is empty while debug data is not empty

Regards

TungNguyen

Tung Nguyen wrote:

Amreen Shaikh wrote:

Hi tung,

1. Did you set StartIndex of your table 

2.Did you set all navigation properties properly



Hope this will help you.


Regards ,
Amreen

Thanks

I have set all properties, my problem is ajax seems reload table but data is empty while debug data is not empty

Regards

TungNguyen

can I have .oml of it.


Hi Tung,

Instead of refreshing the table itself, can you wrap it inside a container, name the container and ajax refresh it?
Like, <div>(For Table Records)
           <table>(Table Records itself)
           <div>(Container for table footer)
               <List_Counter>
               <List_Navigation>
Thanks,

Ragul
            

Hi Tung,


Please try to Ajax refresh the parent of your table(Wrapper or whole container )where your whole table with pagination comes under this container or wrapper.


Thanks,

Manish

Amreen Shaikh wrote:

Tung Nguyen wrote:

Amreen Shaikh wrote:

Hi tung,

1. Did you set StartIndex of your table 

2.Did you set all navigation properties properly



Hope this will help you.


Regards ,
Amreen

Thanks

I have set all properties, my problem is ajax seems reload table but data is empty while debug data is not empty

Regards

TungNguyen

can I have .oml of it.


Sorry i can't send .oml to you

Thanks


Manish Pandey wrote:

Hi Tung,


Please try to Ajax refresh the parent of your table(Wrapper or whole container )where your whole table with pagination comes under this container or wrapper.


Thanks,

Manish

Hi Manish Pandey

Thanks for your comment

About my problem

Table seems refresh because if remove ajax reload it, data of page 1 not change for page 2 page 3 but problem is it not detect new data when change page number so display "No items to show..." at table records


Tung Nguyen wrote:

Manish Pandey wrote:

Hi Tung,


Please try to Ajax refresh the parent of your table(Wrapper or whole container )where your whole table with pagination comes under this container or wrapper.


Thanks,

Manish

Hi Manish Pandey

Thanks for your comment

About my problem

Table seems refresh because if remove ajax reload it, data of page 1 not change for page 2 page 3 but problem is it not detect new data when change page number so display "No items to show..." at table records


Add "List_Navigation_ResetStartIndex" in your table's start index and also don't forget to add this action before your ajax refresh.


Thanks,

Manish


Hi Tung Nguyen,

The List_Navigator was designed to change the StartIndex of your Table Records, based on the same Source Record List (page two would just start displaying records from position List_Navigation_GetStartIndex() to List_Navigation_GetStartIndex() + LineCount - 1).

You are fetching the data for a single page every time the user clicks on the pagination buttons, and then changing the Source Record List to the contents of that new page, which means you'd always want to display the first page (which means your Table Records' StartIndex should always be 0).

Jorge Martins wrote:

Hi Tung Nguyen,

The List_Navigator was designed to change the StartIndex of your Table Records, based on the same Source Record List (page two would just start displaying records from position List_Navigation_GetStartIndex() to List_Navigation_GetStartIndex() + LineCount - 1).

You are fetching the data for a single page every time the user clicks on the pagination buttons, and then changing the Source Record List to the contents of that new page, which means you'd always want to display the first page (which means your Table Records' StartIndex should always be 0).


Thanks Jorge Martins

i understood your explain about my problems but if set StartIndex always be 0 order number of all pages always start from 0 So how to increase order number follow page 

Tung,

Consider when you first load the page:

  • Table Records' StartIndex = 0
  • List_Navigation_GetStartIndex = 0 (this is stored in session by the List_Navigation)
  • Data List contains the first 2 records

When you click on the Next button:

  • List_Navigation_GetStartIndex = 2 (this is determined by List_Navigation web block itself, basically it stores in session List_Navigation_GetStartIndex() + Table Records' LineCount)
  • Table Records' StartIndex = 0
  • Data List contains the next two records

Since it is the List_Navigation that stores information about what page it is displaying (in session, fetched by List_Navigation_GetStartIndex), its UI will be updated correctly regardless of the value of the Table Records' StartIndex value.