Hi !
I have a GridView filled using a strongly typed datasource, in which one more more fields are deeploaded (see code below for an example).
<data:RegionDataSource ID="__regionDS" runat="server"
SelectMethod="GetPaged"
UpdateMethod="update"
EnableDeepLoad="true"
>
<DeepLoadProperties Method="includechildren" Recursive="false">
<Types>
<data:RegionProperty Name="Country" />
</Types>
</DeepLoadProperties>
</data:RegionDataSource>
<asp:GridView ID="__regionGV" runat="server"
DataSourceID="__regionDS"
AutoGenerateColumns="false"
AllowSorting="true"
DataKeyNames="Id"
>
<Columns>
<asp:BoundField DataField="Name" HeaderText="Nom" SortExpression="Name" />
<asp:TemplateField HeaderText="Pays">
<ItemTemplate>
<%# Eval("CountryIdSource.Name") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
I would like to allow to sort this gridview on both columns. The first one is not a problem, but I don't know how to sort on the deeploaed field "CountryIdSource.Name". Could someone please explain me how to do this, keeping in mind that I'd like to keep usage of the strongly typed datasource (it's really useful !!).
Thanks in advance !