×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9
3

typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

(OP)
Hi,everyone,

as part of training in VFP9 , i am experimenting to change the value in a grid cell and would like to know if i type a character value in lowercase, how/where in the pem i need to specify to convert the character type to uppercase ?

i am assuming it has to be under the AfteRowColChange, so let say, if this cell will be under column1, then what should be the code to accomplish it ?
Thanks a lot in advance

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

Put an ! in the inputmask property of the column-textbox

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483: How to get the best response from the forum first.

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

(OP)
Hi Mike,
i just created a simple form and then i dragged the grid control, then in the recordsource property i assigned the table, so i don't have under the PEM grid neither columns or text
Thanks

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

Change your columncount property in the grid.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483: How to get the best response from the forum first.

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

In the form designer, select the grid column that you want to capitalise. Do this in the drop-down at the top of the property window. Then, in the InputMask property, type a single exclamation mark. (If you want to capitalise more than one character, enter that number of exclamation marks.)

From now on, whenever you enter a letter in the specified column, it will appear in capitals.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

(OP)
Thanks a lot both Mike

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

Put the table in the forms Data Environment, then drag the table to the form, voila, you have a grid with all columns, captions etc to individualize the columns, controls, input mask and other properties, write code etc. Many things actually will be taken from what you can specify in the table designer.

Besides, you have the feature to specify which controls are used in grid creation in the table designer.

Display library/Display class will be used in the grid column for the field, the caption will be set on the column header and the input mask and format are set. That's where all this has its effect.

You can then either keep it at the Data Environment or use any other means and framework to open data, I'm not a fan of the DE, but that feature is nice and if you drag a single field you get this as a single control.

Anyway, you also have the grid builder and other wizards, and while it's noble in general to do everything on your own and don't bring in all the dependencies, I do design grids to have all the columns etc to display a specific table or query result, that way you have the most control.

There are pros and cons about this, you only shift the work into the table designer instead of the form designer. The table wizard covers most of these things, especially offering some default input masks, but it won't let you select the control used for fields, overall it has more weight on offering some table templates and structures.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

(OP)
Thanks Olaf, i did not know that but in fact DE it is not the way to go as if you want the recordsource of the grid to be a cursor from a select sql , most lilely i will call the table from the load form event but this was an excellent information

RE: typing in a grid cell a character in lower case but make sure it becomes uppercase VFP 9

Yes, and in a good normalized database you likely rather have queies joining data before you display it, yet master/slave grids with relations are not unusual.

What's a bit sad is that a query does not inherit this side information, the VFP cursor hasn't all meta data about a table or the tables in it, which you query. Also a cursor adapter you create with a cursor schema won't inherit this information. At least you can put that or a view in the DE to drag& drop and get a grid you later can feed with queries you do in data access classes or the form Load.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close