I have an application within which I am using a DevExpress GridControl. A column is populated correctly EXCEPT when the property returns a string.Empty value. In this case, the object name of the form X.Y.Z is displayed.
If I return a " " string an empty string value is displayed as I would like. If I over ride the ToString method on the class and return a string.Empty value, then an empty string is displayed in the field.
Why doesn't returning string.Empty display the expected value when I return it from the property? And, is there a way to specify that I want string.Empty as the default value for the column other than over riding ToString?
Please check that your property value is string (not the instance of class) As default auto populated columns would be done for any property.
to cancel autogeneration of column use attribute [Display(AutoGenerateField = false)]
(instance of class).ToString() will return the name of class to;