Jump to content

How do I save a null value with the TUniDBNumberEdit?


movedown

Recommended Posts

Hi Farshad,   

  I use the TUniDBNumberEdit bound to a Float field. When I emptied the TUniDBNumberEdit, there was an error: "null" is not a vaild floating point value.

  This is a bug?

  How can I save a null value with the TUniDBNumberEdit?

 


 Delphi XE2

 UniGui version: 0.093.996

 Browser: Last Version Chrome.

 


  thx.

  • Upvote 1
Link to comment
Share on other sites

Numberedit  can only save numbers.

 

Hi Farshad.

I think it is difficult to say, what is it a bug, but it needs to be solved (maybe a property as Default Value) ...

 

This nasty error comes out every time you use the Number Fields (when the value becomes empty), of course, when used DataSet controls: UniDBEdit, UniDBNumberEdit, UniDBGrid etc.

 

Thanks...

Link to comment
Share on other sites

  • 2 weeks later...

 

  How can I save a null value with the TUniDBNumberEdit?
 

 

hi Dsciral.

 

try this

add to designtime UniDBNumberEdit1 -> ClientEvents -> ExtEvents

function OnKeyup (sender, e){   
  if (sender.getValue() == null) {
    sender.setValue(0);   
  }
}

 I hope that will help...

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...