Hi Ed,

http://dabodev.com/wiki/HowToPopulateAndUseListControls

Ups, i've missed it.... but still having problems

I have this in escola.cdxml:
...
<dDropdownList sizerInfo="..." DataSource="escolas" 
designerClass="controlMix" ValueMode="Key" Name="dTextBox6" 
DataField="distrito"></dDropdownList>
...

In escola-code.py this:
...
    def getAvailableTypes(self):
            crs = self.getTempCursor()
            crs.execute("select id, nome from distritos order by nome")
            ds = crs.getDataSet()
            # Create the lists
            names = [rec["nome"] for rec in ds]
            keys = [rec["id"] for rec in ds]
            return (names, keys)
...

Do i have to add a Choices and Keys properties with the values?? how do 
i retrive them from the DB??

Also, if i need two or more lists in the same form how do i do it with 
getAvailableTypes??

I'm sorry, but i'm still lost....

Thanks for the patience...

Pedro Vale de Gato


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to