Let’s say I am using databinding like this:
List<Entity> Entities = <some data>
entityBinding.DataSource = Entities;
lstEntities.DisplayMember = "Description";
which works fine. However, I want to manipulate the string coming back as the Entity’s “Description”. How can I call a function on DisplayMember?
You cannot call a function on that field – but you could create a new property on your entity called
MyDescriptionwhich does toDescriptionwhatever it is you want to do, and then use that new property as yourDisplayMember