Hi
I am using CSLA data source which is generated using multiple tables. Like I have columns in the datasource fetched from the more than 1 table.
I have attached this to the devexpress grid view as data source. following is the code
<ehr:CustomGridView ID="PlacementListGridView" runat="server" AllowPaging="True" SkinID="customGridviewSkin"
AutoGenerateColumns="False" DataSourceID="PlacementListDataSource" CustomPageSize="4"
KeyFieldName="PlacementId" OnCustomButtonCallback="PlacementListGridView_CustomButtonCallback">
<Columns>
<dx:GridViewDataTextColumn FieldName="PlacementID" ReadOnly="True" Visible="False"
VisibleIndex="0">
</dx:GridViewDataTextColumn>
<dx:GridViewDataHyperLinkColumn FieldName="JobTitle" VisibleIndex="1">
<PropertiesHyperLinkEdit NavigateUrlFormatString="~/Pages/Admin/PlacementEdit.aspx?PlacementId={0}">
</PropertiesHyperLinkEdit>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataDateColumn Caption="<%$ Resources:resPlacement, Forename %>" VisibleIndex="2">
<DataItemTemplate>
<dx:ASPxLabel ID="lblForename" runat="server" Text='<%# ((Contact)Eval("ContactMemberByCandidateContactID")).Christian %>'>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataDateColumn>
<dx:GridViewDataDateColumn Caption="<%$ Resources:resPlacement, Surname %>" VisibleIndex="3">
<DataItemTemplate>
<dx:ASPxLabel ID="lblSurname" runat="server" Text='<%# ((Contact)Eval("ContactMemberByCandidateContactID")).Surname %>'>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataDateColumn>
<dx:GridViewDataDateColumn Caption="<%$ Resources:resPlacement, Supplier %>" VisibleIndex="4">
<DataItemTemplate>
<dx:ASPxLabel ID="lblSupplier" runat="server" Text='<%# ((Company)Eval("CompanyMemberByMainSupplierCompanyID")).Name %>'>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataDateColumn>
<dx:GridViewDataDateColumn Caption="<%$ Resources:resPlacement, HiringManager %>"
VisibleIndex="5">
<DataItemTemplate>
<dx:ASPxLabel ID="lblHiringManager" runat="server" Text='<%# ((Contact)Eval("ContactMemberByLineManagerContactID")).Christian + " " + ((Contact)Eval("ContactMemberByLineManagerContactID")).Surname %>'>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataDateColumn>
<dx:GridViewDataDateColumn Caption="<%$ Resources:resCompany, Company %>" VisibleIndex="6">
<DataItemTemplate>
<dx:ASPxLabel ID="lblCompany" runat="server" Text='<%# ((Company)Eval("CompanyMemberByCustomerCompanyID")).Name %>'>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataDateColumn>
<dx:GridViewDataDateColumn Caption="<%$ Resources:resPlacement, StartDate %>" VisibleIndex="7">
<DataItemTemplate>
<dx:ASPxLabel ID="lblEndDate" runat="server" Text='<%# Eval("StartDate","{0:dd/MM/yyyy}") %>'>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataDateColumn>
<dx:GridViewDataDateColumn VisibleIndex="8" Caption="<%$ Resources:resPlacement, EndDate %>">
<DataItemTemplate>
<dx:ASPxLabel ID="lblEndDate" runat="server" Text='<%# Eval("EndDate","{0:dd/MM/yyyy}") %>'>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataDateColumn>
<dx:GridViewCommandColumn VisibleIndex="9" Caption="Options">
<DeleteButton Visible="True" Text="<%$ Resources:resGlobalResource, Delete %>">
</DeleteButton>
<CustomButtons>
<dx:GridViewCommandColumnCustomButton ID="btnSelect" Text="<%$ Resources:resGlobalResource, Select %>">
</dx:GridViewCommandColumnCustomButton>
</CustomButtons>
</dx:GridViewCommandColumn>
</Columns>
</ehr:CustomGridView>
I am not able to do the filtering and sorting? rather filtering and sorting is not working
Copyright (c) Marimer LLC