It's not possible to override the metadata in the client that you set on the server.
In particular, the RIA Services concept of metadata classes is a server-side one - and only used when using Entity Framework with the model-first-approach where you have the designer create your entity classes). The attributes you put on the metadata classes on the server will be auto-generated during build as attributes on the actual entities on the client.
Since the ordering attributes are the only way I know of to control the DataGrid
ordering when using auto-generated columns, I can only think of two ways to evade the issue:
- Specify the columns in your grid explicitly (in the end you probably have to anyway for a host of reasons, auto-generated columns are rarely sufficient in practice) or
- use the same ordering in both the client and the server entities.
(For the sake of completion I should mention that you can also fiddle with the way RIA Services client code is auto-generated, but that would be inappropriate for the problem you're having.)