Welcome Guest, Not a member yet? Register   Sign In
Sorting paginated table
#1

[eluser]Mutsop[/eluser]
Hi,

How would you sort a paginated table using a combobox in my case?
What I thought was just using a call from the combobox and using an "if" state. Problem is I would have almost the same code over and over again for each column filter.

Btw How do I get the combobox value into my controller (from the view)?

Any suggestions?
#2

[eluser]SPeed_FANat1c[/eluser]
I assume you have column names in combobox and choose it and want data to be sorted by it? You have to refreh the table page on changing combobox. You must make submit button or use javascript on change (combobox). You probably want to get value with javasript so you don't need a submit button.

With jquery you can get it this way:

Code:
$("#ComboBox").val()

Please tell if you have any knowledge about jquery. If not maybe you just want to use form submit buton, then you can get data as any other input field - using $this->input->post()




Theme © iAndrew 2016 - Forum software by © MyBB