views:

65

answers:

2

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
A: 

Is this what you are looking for?

Arnis L.
Exactly, thanks alot!
Marcus
Say thanks to Maarten. I'm just following his blog. :P
Arnis L.