select text and in the same table

select text and in the same table

adigaadiga Posts: 1Questions: 1Answers: 0

hi,

like in the picture, How do I do that

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    depends. Basically you add a second header row with the appropriated control (text boxes or select boxes or whatever) in the th so it looks something like

            <thead>
                <tr>
                    <th>Name</th>
                    <th>Position</th>
                    <th>Office</th>
                    <th>Age</th>
                    <th>Start date</th>
                    <th>Salary</th>
                </tr>
                <tr>
                    <th> <input type='text'> </th>
                    <th><input type='text'></th>
                    <th><select><option value='Tokyo'>Tokyo</option></select></th>
                    <th> <select><option value=20>20</option></select> </th>
                    <th><input type='text'></th>
                    <th><input type='text'></th>
                </tr>
            </thead> 
    
    

    Then you add the appropriate event handlers to trigger the search.

    It becomes more complicated depending on such things as scroller turned on, or serverSide set to true.

    I have not seen anything to make me think these feature are already built into DataTables. I can build you a working example if you like but it will be a while before I can get to it.

This discussion has been closed.