actions before search.dt event

actions before search.dt event

ledled Posts: 14Questions: 6Answers: 0
edited May 2016 in Free community support

Need help on running code before search.dt event.

  $("#" + obj.tableId + "_filter input").keyup(function (e) {
            obj.startIn = 0;
            debugger;
            if (obj.serverSideProcessing) {
                var value = $(this).val();
                obj.initState = false;
                obj.operation = 'SELECT';
                obj.prepareData(value, true);
                obj.setDML(value, true);

            }
        });

Any help?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,794Questions: 1Answers: 10,513 Site admin

    What is it that you want to achieve with the code? There might be a different / better way to do it.

    Allan

  • ledled Posts: 14Questions: 6Answers: 0

    I need to convert data to diferent format before sent it to the server.

    Lets say i need to build a dynamic sql query

    I need to run
    obj.prepareData(value, true);
    obj.setDML(value, true);

    'value' is the search input value

  • allanallan Posts: 63,794Questions: 1Answers: 10,513 Site admin
    Answer ✓

    Use ajax.data to convert or modify the data being sent to the server.

    Allan

This discussion has been closed.