Jump to content


Photo

Problem with validating input


  • Please log in to reply
5 replies to this topic

#1 didiergm

didiergm
  • Honorable Members
  • 148 posts
  • Gender:Male
  • Location:France

Posted 17 February 2011 - 07:18 PM

I am trying to achieve the following when the user enter a telephone number.

1- Test that the telephone number is valid, (i.e. all digits and the proper length). if the telephone is not valid then I want the original input to stay in the cell (ie not be rejected as in EditAccet event, because the user may have mistyped one digit, and does not want to re-input the whole number)

2- if the number is valid, I want to format it with spaces etc..

3- then it is stored in the field.

I can sort of do 2, but I cannot do 1 as I do not understand how to prevent the focus to change row/column. I can go back to the column, but if the user has clicked on a different row, it is the right column but on a different row

How could I handle this ?

Note that if this cannot be handled in a dbgrid, I am happy to change to a regular grid, but would need some help too.

Didier


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 19 February 2011 - 07:39 PM

Hello Didier,

I will need to think before I answer. Thank you for waiting.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 20 February 2011 - 05:45 AM

Hello Didier,

I have do a little testing and what we miss is one event which will not exit from editing mode if input is not valid

I will add in next few days new event for this. Maybe it will be tricky, so please thanks for waiting.

best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 21 February 2011 - 12:19 AM

Hello Didier,

I am having problem with implementing OnEndEditing event. Maybe I will need more time to complete it.

Problem is that when you press Return, inplace editor lose focus, and I have try everything to bring focus back to Inplace Editor, but without luck sad.gif

I may send you a code, and maybe you can help me and may find a solution.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 didiergm

didiergm
  • Honorable Members
  • 148 posts
  • Gender:Male
  • Location:France

Posted 25 February 2011 - 12:16 AM

QUOTE (Boki (Berg) @ Feb 21 2011, 12:19 AM) <{POST_SNAPBACK}>
Hello Didier,

I am having problem with implementing OnEndEditing event. Maybe I will need more time to complete it.

Problem is that when you press Return, inplace editor lose focus, and I have try everything to bring focus back to Inplace Editor, but without luck sad.gif

I may send you a code, and maybe you can help me and may find a solution.

Best regards


Yes, please Boki, If I may help, fell free to send me your code.

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 27 February 2011 - 08:15 AM

Hello Didier,

Please sorry for delay. I am sending you now files on mail. Please re-compile packages.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users