On Monday 11 May 2009 07:48:56 am Sibylle Koczian wrote: > johnf schrieb: > > On Monday 11 May 2009 03:59:20 am Sibylle Koczian wrote: > >> I tried this, and now the dDropdownList is filled correctly, I get no > >> error messages - but the parent-child relation doesn't seem to work: the > >> grid for the child records always shows the records belonging to the > >> first parent record. > > > > I didn't see anything in the code that looked wrong so I would start > > doing some debugging. > > > > I have a guess that the problem is the dropdown is changing but the > > record of the 'rubrik' is not moving. So you can prove it. > > It's even worse: the record of the "rubrik" bizobj not only doesn't > move, it gets the key of the record just shown in the dropdown. And that > key is the primary key of the table. Wonderful. Luckily I haven't done > anything about saving yet. > > It's clear I made quite wrong assumptions about dDropdownList (and about > the other list controls?). I thought moving through the choices list > would move through the records of the dataset and show the content of > the current DataField, but instead it seems to put the current value > _into_ the DataField of the current record, which doesn't move. Right? > > > First open a dShell (contrl-d). > > Many thanks for that advice, I hadn't discovered the dShell yet!
> > Thank you, > Sibylle In my code I do something similar that is I use a dropdown to provide the filter/where clause info. But I bind the 'Hit' event to a method. In the method I set the whereclause of the table I need filtered - then requery the table. It works well. topiclist.bindEvent(dabo.dEvents.Hit, self.get_essess1) def get_essses1(self,evt): self.essession.setWhereClause("topic = %s" % self.Topic1ID.Value) self.essession.requery() With my solution do NOT provide a DataSource and DataField for the dropdown. Get use the value from the selection and set the starting value of the dropdown. Also you will need a way save the value into the table. There are plenty of ways to go - but you get the general idea. -- John Fabiani _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/200905110807.47147.jfabi...@yolo.com