| 6/19/2007 7:12:44 PM |
I'm working on a demo that illustrates how WORM can be used in conjunction with the GridView/ObjectDataSource. Anwyays, it appears that sorting doesn't work when the "alias" != "field"
Example:
<attribute member="id" field="ProductID" alias="Id" type="System.Int32" /> (in mapping.xml)
< asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True" SortExpression="Id" /> (in asp:gridview)
The exception:
System.Data.SqlClient.SqlException: Invalid column name 'Id'.
But I don't get it! The whole idea of the "alias" attribute is to abstract your object property names from the corresponding table column names ... WORM should be smart enough to use the "field" attribute irregardless of whether "alias" is used or not.
Am I missing something here???
Thanks - wayde |