[IronPython] Data binding - how?

Patrick O'Brien sum.ergo.code at gmail.com
Thu Dec 7 20:28:01 CET 2006

On 12/7/06, Dave Fugate <dfugate at microsoft.com> wrote:
>  OK, I've now recreated your sample in C# and found it basically works.
>   I just commented out the calls to Columns.Add(…) and changed the ages
> from integers to strings just to be on the safe side.
> On a hunch, I redefined "people" in your original Python code to:
>                people = System.Collections.Generic.List[Person]()
> and
>                people = System.Collections.Generic.List[System.Object]()
> Neither of these work either so it does not appear to be a mismatch
> between Python and CLR list types.  At this point, I'm fairly sure that
> there's a bug or unimplemented feature in IronPython where Python properties
> do not map to CLR properties as you say.  An educated guess is that this
> might have something to do with the fact that the Python property decorator
> does not give the type.

The correct number of rows get created in the grid, so I don't think the
problem is with the list.  Rather, it is with the objects in the list and
the ability to get the attributes of those objects.  But I don't know why
this should be a problem.  Especially with a text column, since any Python
object/attribute can be represented as text.  So hopefully it will be easy
to fix.  Thanks for your help.

Patrick K. O'Brien
Orbtech       http://www.orbtech.com
Schevo        http://www.schevo.org
Louie         http://www.pylouie.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20061207/aa7240c8/attachment.html>

More information about the Ironpython-users mailing list