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?
jasonboetcherAsked:
Who is Participating?
 
Maxim10553Connect With a Mentor Commented:
The column object has a property called Datawidth. This is of type long and defaults to 0 which imposes no size restrictions. Set this value to 7 and your problem should be solved.
0
 
GordonpCommented:
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
0
 
jasonboetcherAuthor Commented:
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.
0
 
GordonpCommented:
Never Mind Eh!
0
 
jasonboetcherAuthor Commented:
Thanks!! Works great.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.