Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3 questions - about grid, doubleclick and remote connect
Message
De
15/08/1997 17:01:17
 
 
À
14/08/1997 16:02:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00044726
Message ID:
00045044
Vues:
27
>>Hi all, >>I started using VFP (5.0a) fairly recently and as you may gues I am already facing numerous obstacles. Questions would be the following: >>1) In a grid I'm trying to show both fields from parent and child tables. Column containing child table field has a combo-box embedded (sparce of the column is set to .F.). Column's ControlSource property is set to ParentTable.PointerToChildRecord (foreign key in child), combo box ControlSource is set to the same value, combo box RowSource is set to ChildTable.DesiredFiled and RowSourceType is "field". Relation is set in dataenvironment of the form so that ParentTable.PointerToChildRecord = ChildTable.ForeignKey. >>Problem is, when I run the form, that the column containing child table field displays value from record where ParentTable.PointerToChildRecord = ChildTable.ROWNUMBER (?) and not ParentTable.PointerToChildRecord = ChildTable.ForeignKey. For example, if value of ParentTable.PointerToChildRecord = 3 (numeric), it points to the third row in child, not to the record with foreign key=3. This would be fine when you have an array for a RowSource, but in my case is pretty useless. I tried to change linking field type from numeric to char, didn't work.Anybody had such a problem? > >Firstly, you don't need in relations here. Secondly, character field would work Ok. Numeric field will involve some tricks. > >>2) There's a grid on the simple "Search" form. In grid's DoubleClick event I tried to place something like "release this.parent" so the form would be released and user can go back to the calling form. However it looks that DoubleClick event never fires no matter where I doubleclick on the grid (I checked this even by placing a "wait" message in the DoubleClick code of the grid ). What am I missing here? > >You will fire Grid.Dblclick if you click in "empty" (outside column/header) grid space only, else you fire Header.dblclick or Column.Control.Dblclick > >>3) Is there any way to suppres/replace message "Executing remote, press ESC to cancel.." while connecting to remote data source? > >Probably, SET ESCAPE OFF (don't remember exactly) > >BTW, I would recommend you to split your future questions. Long ones can scare potential helpers. Edward, thanks a lot, Regarding the first question, it did work when I converted field type to char, set column ControlSource to Parent.PointerToChild field, column Bound to .F., combo box ControlSource to Child.DesiredField and combo box RowSource to Child.DesiredField. I only didn't understand what you ment by saying that I dont need relation. Without a relation I can't show related value from child table for selected parent record, wright? My relation is only set in data environment of the form (nowhere else programatically). Also, thanks for the rest of your answers, everything worked fine. Your recomendation about splitting questions acknowledged. All the best, Srdjan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform