Server-side processing editor

Server-side processing editor

111qqq111qqq Posts: 4Questions: 0Answers: 0
edited September 2012 in General
hi.....
how can i made Server-side processing editor...

i try this but it's not working...

//this is a part of editor code ....
oTable = $('#example').dataTable( {
"sDom": "Tfrtip",
"bProcessing": true, //
"bServerSide": true, // i add this to be Server-side .... but it's not working
"sAjaxSource": "php/details_col.php",
"aoColumns": [
{ "mDataProp": "browser" },
{ "mDataProp": "engine" },
{ "mDataProp": "platform" },
{ "mDataProp": "version", "sClass": "center" },
{ "mDataProp": "grade", "sClass": "center" }
],
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [
{ "sExtends": "editor_create", "editor": editor },
{ "sExtends": "editor_edit", "editor": editor },
{ "sExtends": "editor_remove", "editor": editor }
]
}
} );


every one can help me ...... that .... what must i do ??? ?? PLZ help...!

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Firstly, when you create a new question it specifically says:

    > Do not: Post the same question multiple times.

    So please don't do that.

    Secondly it says:

    > Do: Provide a link to the web-page your question is about.

    So please do that.

    Thirdly, I don't have a record of your Editor trial version or a purchased license, so I guess the first question is, have you actually installed Editor?

    Allan
  • 111qqq111qqq Posts: 4Questions: 0Answers: 0
    Firstly, sorry about my fault .. i don't see any button to remove the extra post.

    Secondly, i think my question almost is clearly .. but Okay ... i'll explain more

    Thirdly, actually Yes .. i was installed last version DataTables and Editor correctly and it work good too.

    now ... I explain my problem Completely

    in this link data load and processing server_side

    http://datatables.net/release-datatables/examples/server_side/server_side.html

    i mean when the user load the page ... first user get only 10 record of 57 record
    and when user click to the next button the server load 10 another record again ...
    do you get it?
    i mean server do not load all 57 record together and in the first request...
    .
    .
    .
    now my problem

    all the example of Editor do not do that ...... i mean all the example load 57 record together .... i want they load server_siding ...
    for examle only 10 by 10 and when user click to the next ... server load only 10 another record...
    Otherwise it will made a problem in several query record of my databases...

    So i wish you get my problem ... and more than that .... you can solve it......

    In the last ... Thank's for your respond. GOOD LUCK
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Yes it is perfectly possible - just have DataTables load its data from the server-side processing script, and then have Editor post updates to its own script. The two do not need to share the same PHP script.

    Allan
  • 111qqq111qqq Posts: 4Questions: 0Answers: 0
    edited October 2012
    it's cool that you say ... "Yes it is perfectly possible"

    ..... but please help me more .....

    i try it but it's not working .....

    Look.... when we use DataTables Server-side we must send this output array(of course with json syntax) for response to request

    $output = array(
    "sEcho" => intval($_GET['sEcho']),
    "iTotalRecords" => $iTotal,
    "iTotalDisplayRecords" => $iFilteredTotal,
    "aaData" => array()
    );

    but when we use Editor we must send this output ....
    $output = array(
    "id" => '-1',
    "error" => '',
    "fieldErrors" => array(),
    "data" => array(),
    "aaData" => array()
    );

    and i can not change or add some variable to output .... it not work...

    i mean when i try this(when i send this output.)
    $output = array(
    "add_more" => 'aaa', // i add this VAR for example
    "id" => '-1',
    "error" => '',
    "fieldErrors" => array(),
    "data" => array(),
    "aaData" => array()
    );

    the script is not work !!.
    do you get my problem Completely ....? .... what must i do ????? ... :(
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    The two are mutually exclusive - you can have:

    [code]
    sAjaxSource: "serverside_processing.php"
    [/code]

    in the DataTables initialisation and:

    [code]
    ajaxUrl: "someOtherUrl.php"
    [/code]

    in the Editor initialisation. They do not need to be the same! In this manner, you can keep your server-side processing script and also your Editor script and they will both just work.

    Allan
This discussion has been closed.