[IronPython] missing method in datagridview?

Dino Viehland dinov at exchange.microsoft.com
Wed Jul 19 11:04:00 PDT 2006


I think.Columns['ButtonCol'] not working may be a bug.  .Columns.Item['ButtonCol'] shouldn't work.  The interesting question is if the bound columns should show up as well - that's probably not our bug but I won't know w/o doing some more research into how the columns are supposed to work.

I've opened a bug http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=1091  to look into this.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder
Sent: Wednesday, July 19, 2006 10:57 AM
To: Discussion of IronPython
Subject: Re: [IronPython] missing method in datagridview?


Can you access the DataGridViewColumnCollection via indexers (eg myDataGridCollection[0] ? )


Yes.

dgv = DataGridView(AutoGenerateColumns = True,DataSource = myBindingSource)
myCol = DataGridViewButtonColumn(Text="Spaminate",Name="ButtonCol",UseColumnTextForButtonValue = True)
dgv.Columns.Add(myCol)
                                             )
#works, returns myCol
print dgv.Columns[0]

#fails
print dgv.Columns[1]

#fails
print dgv.Columns['ButtonCol']

#fails
print dgv.Columns.Item['ButtonCol']
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20060719/2fe35001/attachment.html


More information about the users mailing list