Hi,
I'm using a datagridview that uses a collection of my objects as it's
data source. When the data source is first hooked up, I tap itno the
OnColumnAdded event so that I can set certain properties of the column
when it's being created. In determining what settings I would like to
change depends on what the current property is being used from my
object. My questions is, when a data source is set for a DtatGridView,
in the OnColumnAdded event, how do I get the type of the property object
(not just the name, but that actual type) that is creating the column?
Not sure if this makes sense but I can clear it up if needed.
Thanks!
Not - 20 Apr 2007 21:46 GMT
To add to this a little. I would like to use reflection to determine
what attribute I have set on the property in my object that is being
used to create the column. I guess if I have to, I could get the name
of the column, use reflection to get the list of property names of the
object that is going to be used for the DataGridViewRow and then find
out what it's attribute is. I just thought that there might be a more
straight forward way because in the OnColumnAdded event I have the
column object as apart of the event args, I just need to find out which
property is being used as it's 'datasource'.
> Hi,
>
[quoted text clipped - 10 lines]
>
> Thanks!