Author Topic: [SOLVED] TDBGrid OnFieldEditMask  (Read 424 times)


  • Guest
[SOLVED] TDBGrid OnFieldEditMask
« on: August 26, 2019, 08:18:50 pm »
I've searched high and low for info on this and haven't found anything useful. And I may be barking up the wrong tree anyway.

I want to be able to format Grid cells for entries like phone numbers, something will add the dashes to them: 000-111-2222. I realize using an Edit box wld be the easiest way out on this, but the client wants to use the grid for inputting info.

Like I said: I may be barking up the wrong tree with this OnFieldEditMask. But I don't see anything else that resembles masking an entry besides this. And the lack of information (even with Delphi) pretty much means this isn't widely used at all. Even a search here for that resulted in 6 (maybe 7) posts, none of which amounted to anything.


  • Full Member
  • ***
  • Posts: 178
Re: TDBGrid OnFieldEditMask
« Reply #1 on: August 26, 2019, 09:01:12 pm »
You can use dbgrid and  editmask or  edit or combo box
See this
my english is  bad
Lazarus 2.0.6 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : linux mint 19.3 64bit  windows 7 64bit


  • Guest
Re: TDBGrid OnFieldEditMask
« Reply #2 on: August 26, 2019, 09:32:46 pm »
Thanks, nouzi.

I've seen that site before. And while that's a good example of how to add checkboxes and comboboxes and the like to a grid, it doesn't help me very much in masking the entry.

I'm working on catching that field before it gets written to the db, then, through some hocus-pocus (and a little data manipulation), I think I can add the dashes to phone numbers and then send it on to the db. But that's what I want to avoid. If OnFieldEditMask turns out to be what I think it is, then I just need insight on how to use it.

I'm in a holding pattern right now, though. Thanks again for the suggestion.


TinyPortal © 2005-2018