inline editing validation not work

inline editing validation not work

roccotanoroccotano Posts: 2Questions: 0Answers: 0
edited April 2011 in General
Hi to all,
i have try to use the editable plugin from this address.

http://code.google.com/p/jquery-datatables-editable/

http://jquery-datatables-editable.googlecode.com/svn/trunk/inline-validation.html

It work fine, but only inline editing validation not work.
I have add at end of next code my control validation cssclass="required" but if field is empty return a empty value and the server save a empty value.

Thanks in advance.


[code]

$(document).ready( function () {
$('#example').dataTable({

"sDom": 'T<"clear">lfrtip',
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "library/server_processing.php",

"aoColumns":[
{
"bSearchable" : false,
"bVisible" : true
},
{},
{},
{},
{},
{},
{},
{},
{
"bSortable": false,
"fnRender": function(oObj){
var id = oObj.aData[8];

return 'Allega | Dettaglio'
}
}
],
"bJQueryUI": false
})
.makeEditable({
sAddURL : "AddData.php",
sDeleteURL : "DeleteData.php",
sUpdateURL : "UpdateData.php",
"aoColumns" : [
{},
{},
{},
{},
{},
{},
{},
{cssclass: "required"},
null
]
});
[/code]

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Is it done with the validation plug-in? I'm thinking that the fact that you are using server-side processing might be causing this - although I'm not sure to be honest. It might be worth filing an issue on the plug-in: http://code.google.com/p/jquery-datatables-editable/issues/list .

    Allan
  • roccotanoroccotano Posts: 2Questions: 0Answers: 0
    A solution should be use a server side validation with error returning ?
    Thanks Allan.
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Isn't the validation done on the client-side? I was wondering if it just wan't reapplying the hooked that the validation uses? fnDrawCallback might be needed for that (depending on how exactly it is working at the moment...).

    Allan
  • jocapcjocapc Posts: 45Questions: 0Answers: 0
    edited May 2011
    Hi,

    Could you provide me some online example? I have taken your HTML and simulated php page you used and is works fine. You can see online example on the http://jquery-datatables-editable.googlecode.com/svn/trunk/server_side_processing.html where you can edit first column, clear the text and error message will be shown when you try to submit the cell value.

    Thanks,
    Jovan
This discussion has been closed.