Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.
Jan 20, 2007
237
US
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
 
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 first.
 
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
 
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 first.
 
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
 
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.
tabledesign_xx0yet.jpg

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
 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top