Is there any way of setting sort order of my properties with model metadata?
A:
As I know there no easy way to do that. You can override model meta data provider with your customized one via deriving from default metadata provider and apply your sorting method.
protected void Application_Start()
{
ModelMetadataProviders.Current = new ConventionMetadataProvider();
ModelValidatorProviders.Current = new ConventionValidatorProvider();
RegisterRoutes(RouteTable.Routes);
}
Here is nice post.
Sergey Mirvoda
2009-12-23 09:30:00