AI OnAI Off
I suppose you could use the Order property in the Display attribute:
[Display(
Order = 320)]
I cannot use order in the base class because it's being referenced in many other classes. I have tried using order in the child class as below but no luck.
public class childclass : baseclass
{
[Display(
Order=100)]
public string Messagesummary{get; set;}
[Display(
Order=200)]
public string Information {get; set;}
}
You could override the properties in the child classes and add the order value there
You can also change the order in Admin, but then it overwrites what you have in your code. Another approach would be to define those properties in an interface, then have multiple implementations and/or base classes.
I have a base class with two properties(display and value) and the child class(inherits the base class) with two properties(message summary and information).
public class baseclass
{
public string Display {get; set;}
public string Value {get; set;}
}
public class childclass : baseclass
{
public string Messagesummary{get; set;}
public string Information {get; set;}
}
In the CMS, the child class properties are rendered first followed by the base class. But I want
base class properties to appear first followed by base class