The situation is this:
I have a Form which contains a DataGridView. That DataGridView is binded to an object BindingSource.
The objects binded have a Property which is an enum.
What I want to do is to put a column in the DataGridView but instead of showing the number of the enum, I want to map it to a String
Is there an easy way of doing this?
I am thinking of adding another Property to the model that returns the String I want to show, but I would like to avoid that if possible.
Edit:
The enum is this:
public enum FilterClass
{
TypeAFilter = 1,
TypeBFilter = 2,
TypeCFilter = 3
};
I am quite new to the C# world, so maybe I am doing something completely wrong
I would create a new field in the BusinessObject class which represents the string representation of an enum and bind the DataGridView’s Column to this property. Does this approach meet your requirements?