hello :)

hello :)

viavia Posts: 4Questions: 1Answers: 0

I'm using DataTable and want to be able to sort the table using buttons outside the table. and want to sort by profession. How can i do it?

Answers

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin

    Use the order() API method.

    Allan

  • viavia Posts: 4Questions: 1Answers: 0

    i mean i want to select only records with special profession , for example @model.profession_id

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    want to sort by profession

    want to select only records with special profession

    Sort and Select are two different things. Please explain what you want in more detail.

  • viavia Posts: 4Questions: 1Answers: 0

    well, i have a table of employees.
    i have used datatable for search. beside of this i want to have buttons MANAGERS, OPERATORS, ADMINISTRATORS out of table. for example clicking on MANAGERS i want to show only managers in datatable.

    thanks for help

  • HawHaw Posts: 2Questions: 0Answers: 0

    Have the same problem :( can anybody help?
    i have 2 buttons outside the data_table. And want clicking this button to select only particular records. Please give any some advice :(

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin

    @Haw: If you want to select records then use the TableTools fnSelect method - assuming you are using TableTools for row selection.

    @via: It sounds like you want neither sorting or selection, but searching... Use search().

    Allan

  • HawHaw Posts: 2Questions: 0Answers: 0

    guys look, i have simple data_table search. it shows a table with 5 columns (emp_id, emp_name, emp_lastname, emp_status, emp_position). i want search_box to be enabled. but besides this search_box i want to have 2 buttons: MANAGERS and OPERATORS. for example clicking MANAGERS button i want to show in data_table records, where emp_position == manager and in search_box must be possible to search only through managers.
    i just can't come up with solution :(

  • viavia Posts: 4Questions: 1Answers: 0

    i think there is no solution :( i think i will have to write my custom search :(

This discussion has been closed.