⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

list vs ajax_list vs ajax_list_info in getStateInfo() function



Cèsar Martí
  • profile picture
  • Member

Posted 18 April 2012 - 08:23 AM

Hi folks.

In the getStateInfo() function, what's the difference between the states "list", "ajax_list" and "ajax_list_info"? Where do you get each of these states?

Thanks.

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 19 April 2012 - 06:29 AM

[list]
[*]list is the first grid.
[*]ajax_list is only the grid that is called by AJAX, for example if you press the next page button.
[*]ajax_list_info it is just some numeric json data, for example when you press next page button you will have a json that looks like this: {"total_results":326}
[/list]
I get those states from the URL and the post data if any. For example the ajax_list_info is the URL : [i]localhost/your_project/index.php/examples/orders_management/ajax_list_info[/i] with a post data of all the search and paging.

Cèsar Martí
  • profile picture
  • Member

Posted 19 April 2012 - 07:41 AM

Thanks Johnny. Now, I understand.