well this is my work arround..
my validator:
function validaAmortizacion(&$value){
$value = str_replace(",","",str_replace("$","",$value));
$xAmortizar = $_SESSION[basename($_SERVER['PHP_SELF'])."txtxAmortizar"];
if(isset($_SESSION["xAmortizarOnEdit"])){
$xAmortizar=$_SESSION["xAmortizarOnEdit"];
}
if($value>$xAmortizar){
setcookie("alertAmortizacion", "1"); // this is the cookie that will trigger the alert on the js event handler.
}
unset($GLOBALS[_SESSION]["xAmortizarOnEdit"]);
return null;//returns null causes this validator is just a warning validator..
}
add the event handler function to the grid..
$grid->ClientSettings->ClientEvents["OnGridCommit"] = "Handle_OnGridCommit";
then in js Handle_OnGridCommit
function Handle_OnGridCommit(sender,args){
var alertAmortizacion = getCookie("alertAmortizacion");//get the cookie value;
if(alertAmortizacion=="1"){
clearCookie("alertAmortizacion");//clear the cookie so it dies.
alert("La suma de las Amortizaciones no deberia exceder los anticipos!!");
}
}