Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Add a CheckBox to a GridControl
Message
From
04/10/2000 09:35:51
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00424633
Message ID:
00424660
Views:
14
Hi!

>Can someone explain to me how to add an option or checkbox to a VFP Grid Control! I would like to display a mouse pointer not a | to select the record. Anyway to make only 1 field in the grid the clicked on field instead of the entire record displayed.
>
>I have designed a search form that allows user to enter serach criteria and click a search command buttom. If only 1 record found it goes on to a display form. If more than 1 record found it makes visable a grid to show multiple records to choose from.

>I want the user to be able to point and click on the record he selects and then it would go to the next form.

Why you need checkbox for this? Just define Click event for controls in grid. When that event received, sure record pointer in cursor controlled by grid will stay on the record that appropriate to row selected for click. So you now can run your form for current record...

>If he chooses to exit how do I accept that he pressed the ESC key to make the grid disappear?

Well, this is somewhat tricky for grid. The best way is to use Form's KeyPress event with 'Form.KeyPreview = .T.':
if nKeyCode = 27 && ESC key
  if PEMSTATUS(thisform,"MyGrid",5) AND thisform.MyGrid.Visible && if grid opened
    thisform.MyGrid.Visible = .F. ...
  endif
endif
HTH
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
Next
Reply
Map
View

Click here to load this message in the networking platform