Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Help - Non editable columns???
Message
From
02/10/2001 12:03:10
 
 
To
02/10/2001 11:54:59
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00563039
Message ID:
00563106
Views:
21
Hi!

Set the forms KeyPreview to .T. and in the KeyPress event catch the key pressing when grid is active. Then add manually character to the textbox value, or just set focus to the textbox just when key pressed with setting the initial character in it.

>I have a field outside the grid where they key in a part number and the grid moves accordingly. They also have the ability to search by a different manufacturers part number. That is the only way I know how to let them type, see what they type, and move the record pointer.
>
>>Hi!
>>
>>Why set focus outside of the grid? Just set the ReadOnly property of grid to .T. and thats enough. To hide the cursor, in the GotFocus of each control inside of grid use SET CURSOR OFF command, and use SET CURSOR ON in the LostFocus of control. make this on the class level (textbox class special for grid) so you will not need to put the code into each column.
>>
>>HTH.
>>
>>P.S. If you still want to set focus outside of the grid, try to do this in the AfterRowColChange event of the grid.
>>
>>>I have a grid that I use to display the current record in a table - sort of like a listbox - but I use some dynamic coloring for readability along with the headers - and this works fine.
>>>
>>>Now I don't want the user to be able to edit inside the grid. If they click on a grid row or column, I want the record current record to change accordingly but I want the focus to be in a textfield OUTSIDE the grid.
>>>
>>>I have tried to add thisform.txtSearch.SETFOCUS to each of these independantly and together in various configurations.
>>>- thisform.grid1.click
>>>- thisform.grid1.Column1.text1.click
>>>- thisform.grid1.column1.text1.gotfocus
>>>
>>>Just when I think it might be working, the current column/row item field turns to white and I end up with an editing cursor in the field and able to change the data - can't have that.
>>>
>>>What am I missing?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform