On Dec 30, 2012, at 8:10 AM, Carey Gagnon <[email protected]> wrote:

> To populate the dropdownlist I use the following:
> 
> def afterInit(self):
>    bizProvinceState = self.Form.getBizobj("dbo.ProvinceState")
>    bizProvinceState.requery()
>    names = bizProvinceState.getProvinceState()
>    self.Choices = names
>    self.Keys = names
>    self.ValueMode = "Key"

        This is where including the full traceback would be helpful. I'm not 
sure which step is triggering the ValueError exception.

        A typical work-around is to not set the data binding in the designer, 
but after the control is populated. In other words, leave DataSource and 
DataField blank in the designer, and after you set the Choices/Keys/ValueMode 
above, add the lines:

self.DataSource = "dbo.Cities"
self.DataField = "ProvinceState"

        If that still doesn't work, paste the full traceback either in your 
reply, or on dabo.codepad.org.


-- Ed Leafe

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to