server processing with an input column

server processing with an input column

kekitokekito Posts: 15Questions: 0Answers: 0
edited February 2010 in General
hi i'm trying to extract the DB info, to create a table, with a row, which have a column with an input type. I'm finding information about this, but i would like if it's possible do this.

i'm reading all i can, to do that, if somebody know's how to do this, please answer ^^
thxs very much.

:=)

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Client-side processing - do it in exactly the same way you would when not using DataTables.

    Server-side processing - add a little rendering to the table output: http://datatables.net/forums/comments.php?DiscussionID=1388

    Allan
  • kekitokekito Posts: 15Questions: 0Answers: 0
    i'll did 4min before with this,

    "fnRowCallback": function( nRow, aData, iDisplayIndex ) {
    $('td:eq(9)', nRow).html( "" );
    return nRow;
    },

    but, now, i'm trying to change for example row[9], 400 for 300 , and then, change in server. submiting something.. o r sendind to database, to change this value.

    me solution is not really good, no?
    mh.. , the good thing about that, is i d'ont need change my php, to filter this input :P
    but now, i'm trying to send if a button is pressed, to the server to update the value.

    Thxs 4 ur fast answer :)
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    fnRender might be just the function you are looking for: http://datatables.net/usage/columns#fnRender and http://datatables.net/examples/advanced_init/column_render.html

    Your solution is fine - it isn't optimal (what is though...!? :-) ), and fnRender might be a little quicker, but I doubt anyone would very notice if you are using server-side processing or a small number of rows. If you are using client-side processing, then it's probably wrong and bad things will happen then the row displays for the second time :-)

    Allan
This discussion has been closed.