We help IT Professionals succeed at work.

assigning array of objects to datasource of a datagridview (want object properties to become the columns)

muskad202
muskad202 asked
on
747 Views
Last Modified: 2010-05-18
hi !

I have code like:


dataGridView1.DataSource = FunctionWhichReturnsArrayOfCustomObject();



I want this array of objects to be displayed in the datagridview, with the public properties becoming the columns. However, it isnt working. Is there anything additional i need to do?


Thanks :)
muskad202
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
damn ... i realized my careless mistake ... i didnt have any public properties, just public fields !!!

thanks :)
muskad202
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.