Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Binding with DataGrid view in WIndow form
 

Binding with DataGrid view in WIndow form

Hi All,
I have to bind DataGridView with the List<Class> .
By specifying DataPropertyName of the column to the property name of class my code is working fine.
Now I have a class whose property is another class.In this case when I am specifying the DatapropertyName as property name of child class ,I am getting an error (can't convert string to object type).

Column is static(I am not addind to grid at runtime).

Please suggest .
Gyanendar  Friday, August 07, 2009 5:06 AM
Can you post some code you are using??
Please mark the post as answer if it is helpfull to you because it boosts the members to answer more and more.
_SuDhiR_  Friday, August 07, 2009 5:40 AM
Hi Gyanendar,

From my experience, the root cause of your issue is the inconsistence of the types of the properties in outer/inner classes. Could you please provide a code snippet to help us to figure out the root cause of your problem?

Best regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Monday, August 10, 2009 7:11 AM

Hi,

We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Friday, August 14, 2009 2:47 AM

You can use google to search for other answers

Custom Search

More Threads

• Programmatically add Collection to Column of DataGridView
• how to update a db with a text box information.
• Dataview for a join of two datatable?
• Adding text to a Cell Programmatically
• DataGridView DataBinding Issue
• Help needed dinding a datagrid to properies of a business entity (including relations)
• Removing Cell highlighting in datagridview after a mouse click
• Datagrid with Arraylist
• BindingSource AddingNew
• Databinding With One DataSet but multiple tabs on a form