default params doesn't sent

default params doesn't sent

IchigogaboIchigogabo Posts: 1Questions: 1Answers: 0

Hi

I am new to DataTable and JQuery JavaScript world.

I am using data table with server side processing. I understood that by default data table sends a few params to the server (draw, start, length) but the values of this params are 0 or null, sorry for my bad english is not my mother language.

Dataload (this is how i try to get the value from request)

int start = Convert.ToInt32(Request.Params["start"]);
int length = Convert.ToInt32(Request.Params["length"]);
string searchvalue = Request["search[value]"];

JSON

    $('#Contenido').DataTable({
        processing: true,
        serverSide: true,
        filter: false,
        orderMulti: false,
        lengthChange: false,        
        pageLength: 15,
        ajax: {
            url: _raiz + '/cuenta/DatosCuenta',
            type: "POST",
        },
        "columns": [
            { "data": "Id", "name": "Id", "autoWidth": true },
            { "data": "Codigo", "name": "Codigo", "autoWidth": true },
            { "data": "DescripcionCuenta", "name": "DescripcionCuenta" },
            { "data": "Catalogo", "name": "Catalogo" },
            { "data": "CuentaVinculada", "name": "CuentaVinculada" },
            { "data": "ValidoDesde", "name": "ValidoDesde" },
            { "data": "ValidoHasta", "name": "ValidoHasta" },
            { "data": "Vigente", "name": "Vigente" },
        ]
    });

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    That's not happening in the example here. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

This discussion has been closed.