Normal 0 false false false MicrosoftInternetExplorer4
http://es.infragistics.com/dotnet/netadvantage/aspnet/webdatagrid/sorting.aspx
Hi There,
I have a sorting issue with the webdatagrid and perhaps you can help.
I am using a linqdatasource and the main table this is pointing to is a table of foreign keys mostly.
I am using Templated fields to bring in data from the other tables and hiding the Id fields.
See samples code.
<ig:TemplateDataField Key="RevenueLine">
<ItemTemplate>
<asp:PlaceHolder ID="plcRevenueLine" runat="server">
<%#DataBinder.Eval(DirectCast(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "RevenueLine.REVL_Description")%>
</asp:PlaceHolder>
</ItemTemplate>
<Header Text="Revenue Line" />
</ig:TemplateDataField>
<ig:BoundDataField CssClass="hiddenColumn" DataFieldName="PRDM_CMPY_ID"
Key="PRDM_CMPY_ID" Width="0px">
</ig:BoundDataField>
<ig:TemplateDataField Key="Company">
<asp:PlaceHolder ID="plcCompany" runat="server">
<%#DataBinder.Eval(DirectCast(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "Company.CMPY_Description")%>
<Header Text="Company" />
<ig:BoundDataField CssClass="hiddenColumn" DataFieldName="PRDM_PVTL_ID"
Key="PRDM_PVTL_ID" Width="0px">
My question is, can I sort by these items? For example when a user clicks the “Company” column, I want to sort the grid by “Company.CMPY_Description”. How do I set this up.
Thanks for any advice.
Chris in San Diego
Alex answers a similar question in the following forum post:http://forums.infragistics.com/forums/p/24025/88073.aspx#88073