<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>This has been filed as a bug sometime ago, and I
believe it's supposed to be fixed in the next release...</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=realn2s@googlemail.com href="mailto:realn2s@googlemail.com">C L</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=users@lists.ironpython.com
href="mailto:users@lists.ironpython.com">Discussion of IronPython</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, July 18, 2007 9:00
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [IronPython] IronPython objects
as DataSource for DataGridView</DIV>
<DIV><BR></DIV>Hello,<BR><BR>I try to use a DataGridView with a collection of
IronPython objects.<BR>The intention is to use the DataSource property
of the DataGridView<BR>and let the columns be automatically
defined.<BR><BR>Something like: <BR>----<BR>class MyDataObject
:<BR> def __init__(self, a, b,
c):<BR> #
...<BR> pass<BR><BR>f = Form(
Name="Test")<BR>dataGrid = DataGridView()<BR> <BR>data = [
MyDataObject( 11, 12, 13 ) ]<BR># or<BR>#data = [ [11, 12, 13 ]
]<BR>dataGrid.DataSource =
data<BR>f.Controls.Add(dataGrid)<BR>Application.Run(f)<BR>----<BR>This gives
an exception (see below)<BR><BR>And I can't figure out which methods the
objects or the container need to provide<BR>to get the column
names.<BR><BR> Do I have to "implement" IListSource for the
container?<BR><BR>Any help appreciated<BR><BR>Regards,<BR>Claudius<BR><BR>The
exception I get is:<BR><BR>From System.MissingMemberException :
'instance' object has no attribute 'Get'<BR> at
IronPython.Runtime.Operations.PythonOps.GetBoundAttr(CodeContext context,
Object o, SymbolId name)<BR> at
IronPython.Runtime.Operations.CustomTypeDescHelpers.SuperDynamicObjectPropertyDescriptor.GetValue
(Object component)<BR> at
System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetValue(Int32
boundColumnIndex, Int32 columnIndex, Int32 rowIndex)<BR>From
System.MissingMemberException: 'instance' object has no attribute 'Set'
<BR> at
IronPython.Runtime.Operations.PythonOps.GetBoundAttr(CodeContext context,
Object o, SymbolId name)<BR> at
IronPython.Runtime.Operations.CustomTypeDescHelpers.SuperDynamicObjectPropertyDescriptor.GetValue(Object
component) <BR> at
System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetValue(Int32
boundColumnIndex, Int32 columnIndex, Int32 rowIndex)<BR>From
System.MissingMemberException: 'instance' object has no attribute 'Address'
<BR> at
IronPython.Runtime.Operations.PythonOps.GetBoundAttr(CodeContext context,
Object o, SymbolId name)<BR> at
IronPython.Runtime.Operations.CustomTypeDescHelpers.SuperDynamicObjectPropertyDescriptor.GetValue(Object
component) <BR> at
System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetValue(Int32
boundColumnIndex, Int32 columnIndex, Int32 rowIndex)
<P>
<HR>
<P></P>_______________________________________________<BR>users mailing
list<BR>users@lists.ironpython.com<BR>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com<BR></BLOCKQUOTE></BODY></HTML>