I want include the Type name of each object in my collection from my GridView. I have a collection which has four different types in it that all derive from a base class. Call them, Foo, Bar, Fizz, and Buzz.
I want to have that column read, Foo, Bar, Fizz or Buzz, respectively. Below is the Binding I'm using, however, it doesn't work.
So far I have this.
GridViewColumn colC = new GridViewColumn()
{
Header = "Type",
Width = 100,
DisplayMemberBinding = New Binding("listName.GetType().Name")
}
It does work if I use a String property called TypeName which called GetType().Name
for me.
Any ideas? Am I explaining it correctly?