Ver Mensaje Individual
  #2  
Antiguo 10-04-2008
sargento elias sargento elias is offline
Miembro
 
Registrado: mar 2008
Posts: 109
Reputación: 17
sargento elias Va por buen camino
Este es el codigo que he utilizado






Código SQL [-]
if (( key < '0' ) or (key > '9')) and (key <> #8) and (key <> ',' ) then
key:=#0;
if grid.SelectedIndex = 5 then
begin
if (pos(',',grid.selectedfield.text)=0) then
coma:=false
else
coma:=true;
if (key = ',' ) and (self.grid.selectedfield.text = '') then
key :=#0;
if ((coma=true) and (key = ',')) then
key :=#0;
end;
end;












El problema es que ya tengo un dato en ese campo ejem. 10,20 Entonces al modificarlo el self.grid.selectedfield.text ='' nunca esta vacio y claro , y me deja meter todas las comas que quiera. Alguna SOlucion?
Responder Con Cita