Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / April 2007

Tip: Looking for answers? Try searching our database.

DataGridView - Column Datasource

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Not - 20 Apr 2007 21:31 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.