Hello,<br><br>I try to use a DataGridView with a collection of IronPython objects.<br>The intention is to use the DataSource&nbsp; property of the DataGridView<br>and let the columns be automatically defined.<br><br>Something like:
<br>----<br>class MyDataObject :<br>&nbsp;&nbsp;&nbsp; def __init__(self, a, b, c):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # ...<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pass<br><br>
f = Form( Name=&quot;Test&quot;)<br>dataGrid = DataGridView()<br>&nbsp;&nbsp;  <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&#39;t figure out which methods the objects or the container need to provide<br>
to get the column names.<br><br>&nbsp;Do I have to &quot;implement&quot; IListSource for the container?<br><br>Any help appreciated<br><br>Regards,<br>Claudius<br><br>The exception I get is:<br><br>From&nbsp; System.MissingMemberException
: &#39;instance&#39; object has no attribute &#39;Get&#39;<br>&nbsp;&nbsp; at IronPython.Runtime.Operations.PythonOps.GetBoundAttr(CodeContext context, Object o, SymbolId name)<br>&nbsp;&nbsp; at IronPython.Runtime.Operations.CustomTypeDescHelpers.SuperDynamicObjectPropertyDescriptor.GetValue
(Object component)<br>&nbsp;&nbsp; at System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetValue(Int32 boundColumnIndex, Int32 columnIndex, Int32 rowIndex)<br>From&nbsp; System.MissingMemberException: &#39;instance&#39; object has no attribute &#39;Set&#39;
<br>&nbsp;&nbsp; at IronPython.Runtime.Operations.PythonOps.GetBoundAttr(CodeContext context, Object o, SymbolId name)<br>&nbsp;&nbsp; at IronPython.Runtime.Operations.CustomTypeDescHelpers.SuperDynamicObjectPropertyDescriptor.GetValue(Object component)
<br>&nbsp;&nbsp; at System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetValue(Int32 boundColumnIndex, Int32 columnIndex, Int32 rowIndex)<br>From&nbsp; System.MissingMemberException: &#39;instance&#39; object has no attribute &#39;Address&#39;
<br>&nbsp;&nbsp; at IronPython.Runtime.Operations.PythonOps.GetBoundAttr(CodeContext context, Object o, SymbolId name)<br>&nbsp;&nbsp; at IronPython.Runtime.Operations.CustomTypeDescHelpers.SuperDynamicObjectPropertyDescriptor.GetValue(Object component)
<br>&nbsp;&nbsp; at System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetValue(Int32 boundColumnIndex, Int32 columnIndex, Int32 rowIndex)