pass data to serverside

pass data to serverside

lamagylamagy Posts: 11Questions: 0Answers: 0
edited March 2011 in General
Hi, i would like to add a list of dates in a combobox and have that date value passed through the parameters so i can pick it up as an sSearch value for a particular column, which i can then sort using this value,how do i do this please?

Please note that im using server-side function.

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    You can add extra variables being sent to the server using this method with fnServerData: http://datatables.net/examples/server_side/custom_vars.html . From there you can add your new variables into the SQL however is needed to make up the condition required.

    Allan
  • lamagylamagy Posts: 11Questions: 0Answers: 0
    thatnks for that, but would you recommend doing it this way or pass them as sSearch parameters?

    how do you assign a value to all the sSearch_columnid parameters used by Datatables?
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    To be honest it doesn't matter a huge about which way you pick - as long as the server knows what to expect! The advantage of the sSearch_x parameters are that they are set through the fnFilter API method ( http://datatables.net/api#fnFilter ) which will call the draw for you. So to set sSearch_x, just call fnFtiler with a column specific number.

    Regards,
    Allan
This discussion has been closed.