initialiser api.dependant()
initialiser api.dependant()
jmclamen
Posts: 15Questions: 8Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
comment appeler un code api.dependant() d'une autre api.dependant()
merci
ex:
editor.dependent( 'qgpv_lot.prix', function ( val, data, callback ) {
comment appeler l'api.dependant() suivante??
}
editor.dependent( 'qgpv_lot.prix_vendu', function ( val, data, callback ) {
return val > 0 ?
{
show: ['qgpv_lot.taux'],
values:{
'qgpv_lot.hono_ve':(data['values']['qgpv_lot.taux']*data['values']['qgpv_lot.prix_vendu'])/100 ,
}
}
:
{
hide: ['qgpv_lot.taux'],
values:{
}
};
} );
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
You can do something like this : http://live.datatables.net/miyudiwo/1/edit
You'll see that when the
Office
is set toXXX
, it sets the salary field, which triggers its owndependent()
call,Colin