Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,
This is a WinForms application. I have been trying to figure this out for a while with no success. I am binding a datagrid to a BindingList<>. The list currently contains an ID and Member Name, and Status.Is it possible for this Binding List<> to contain a property for a datagrid ? And have that property set/changed based on what is in the list?

So for the status the member can be NEW or OLD. Based on this I will select which image is being displayed in the datagrid.

So basically, I am going to check what the status is of the member and want to places the property in the BindingList<>.

Is this at all posssible?
Thanks for any advice.

VB
WindowsFormsApplication1.Properties.Resources.New_BUBBLE
WindowsFormsApplication1.Properties.Resources.Old_BUBBLE
Posted
Updated 8-Jun-11 15:42pm
v2

1 solution

Try to do the manipulation in CellFormatting event of the grid. Get the row being generated and hence you can get the value of "Status" property as well, now based on that you can set the image in required column.
This link might help you.

I've not tried this, so let me know if it works.
 
Share this answer
 
Comments
WhiskeyBusiness 13-Jun-11 21:10pm    
Thanks RakeshMeena,
I ended up going the route of just manipulating the data in the CellFormatting event.
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900