give me about 20 mins Dave
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Peter Cushing Sent: 22 November 2011 13:34 To: [email protected] Subject: Re: Combo box in grid Dave Crozier wrote: > Peter, > Is the example you want completely in code or using the designer IDE? > > Dave > > Hi Dave, Whatever you can give me Dave. I normally just use the IDE but I can compare properties etc using code. Cheers. > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Peter Cushing > Sent: 21 November 2011 17:27 > To: ProFox List > Subject: Combo box in grid > > Hi all, > > Having a few problems trying to get a combo box in a grid working the way I > want. VFP7 windows 7. > > Copied a previous form that had some stuff similar to what I want, then > changed the grid round a bit. What I normally do with grids is not use the > environment, and in the init put something like: > > thisform.grdsf.RecordSource = "dutyh" > thisform.grdsf.column1.ControlSource = 'dutyh.dh_pk' > thisform.grdsf.column2.ControlSource = 'dutyh.dh_fabrc' > etc > dh_fabrc is a 4 char code and want to get the data from a table with 4 char > code and 30 char description. They pick the description and I save the code. > > I've added the combo to 2 columns (and removed the text box) and I have tried > setting up the data source for the combo several ways. > The trouble is when I run the form and click on the combo drop down it either > won't drop down or only show 1 line. If I add items to the combo manually, > like: > > thisform.GRdsf.COLumn2.COmbo1.AddItem('This is line 1') > thisform.GRdsf.COLumn2.COmbo1.AddItem('This is line 2') > thisform.GRdsf.COLumn2.COmbo1.AddItem('This is line 3') > > the combo now drops down but don't understand why it doesn't work the > other ways (Rowsource type to 6 - fields and specified the field to > pick, or rowsource = 3 - sql and put in a statement that works on > other combos not in a grid) > > Messed about with sparse etc, but can't seem to see what's going on here. > > Any ideas > > TIA > > -- > * Peter Cushing * > IT development and support > > Signature > > ---------------------------------------------------------------- > > > > Rajan Imports has changed - we are now Whispering Smith Ltd. For more > information see our website at www.whisperingsmith.com > > > Please update your address book with my new email address: > [email protected] > > . > > This communication is intended for the person or organisation to whom it is > addressed. The contents are confidential and may be protected in law. > Unauthorised use, copying or disclosure of any of it may be unlawful. If you > have received this message in error, please notify us immediately by > telephone or email. > > www.whisperingsmith.com > > Whispering Smith Ltd > Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 > 3700 Fax:0161 831 3715 London Office:17-19 Foley Street, London W1W > 6DW Tel:0207 299 7960 > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

