Link to home
Start Free TrialLog in
Avatar of jasonboetcher
jasonboetcher

asked on

Apex True DBGrid Pro 6.0 Edit Mask Question

I am using a Apex True DBGrid Pro 6.0, and in one of my columns I need to only allow the users to enter a maximum of 7 digits.  I tried using the code below:

  With dbgTransData.Columns("Case Num")
    .Width = 1100: .Caption = "Case Num": .Alignment = dbgRight
    .EditMask = "#######": .NumberFormat = "Edit Mask": .HeadAlignment = dbgCenter
  End With

The code works as far as only allowing the user to enter 7 digits but I need the default value to display as "0000000".  The code above displays a default value of "0" centered in the column.  

Any ideas on how to get what I am trying to accompish to work?
Avatar of Gordonp
Gordonp
Flag of United Kingdom of Great Britain and Northern Ireland image

Cant speak for the grid your talking about, but if EditMask works the same way as the Format function then the EditMask your looking for would be

..EditMask = "0000000"

Dont know if it'll work but its worth a go.

Gordon
Avatar of jasonboetcher
jasonboetcher

ASKER

Didn't work Gordon.  The column data did display as "0000000" but it would not allow me to edit the data.  Thanks for the idea though.
Never Mind Eh!
ASKER CERTIFIED SOLUTION
Avatar of Maxim10553
Maxim10553
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!! Works great.