我有一个问题,我正在从数据源在网格视图中绑定数据,并且我正在获取不同类型的订单状态开始表格 1 到 7 的信息。我不想在我的网格视图中显示状态 7 数据。你能帮我我们怎么做吗
<data:EntityGridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
DataSourceID="ActiveOrdersDataSource" Width="100%" DataKeyNames="OrderNo" AllowMultiColumnSorting="false"
OnRowCommand="GridView1_RowCommond" OnRowDataBound="GridView1_OnRowDataBound"
DefaultSortDirection="Descending" ExcelExportFileName="Export_ActiveOrders.xls">
<Columns>
<asp:CommandField ShowSelectButton="True" SelectText="Edit" />
<asp:BoundField DataField="OrderNo" ItemStyle-HorizontalAlign="Center" HeaderText="Order No" SortExpression="[OrderNo]" />
<asp:BoundField DataField="OrderDate" DataFormatString="{0:d}" HtmlEncode="False"
HeaderText="Order Date" SortExpression="[OrderDate]" />
<asp:BoundField DataField="PickupCompanyName" HeaderText="Pickup Company" SortExpression="[PickupCompanyName]" Visible="false" />
<asp:BoundField DataField="DeliveryCompanyName" HeaderText="Delivery Company" SortExpression="[DeliveryCompanyName]" Visible="false" />
<data:HyperLinkField HeaderText="Ac.No." ControlStyle-ForeColor="Black" DataContainer="AccountNumberSource"
DataTextField="AccountNumber" />
<data:HyperLinkField HeaderText="Client" DataContainer="AccountNumberSource"
DataTextField="Name" />
<asp:BoundField DataField="Caller" ItemStyle-HorizontalAlign="Center" HeaderText="Caller" SortExpression="[Caller]" />
<asp:BoundField DataField="Department" ItemStyle-HorizontalAlign="Center" HeaderText="Department" SortExpression="[Department]" />
<asp:BoundField DataField="Reference" HeaderText="Reference" SortExpression="[Reference]" />
<asp:TemplateField HeaderText="Driver" HeaderStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblDriver" runat="server" Text='<%#Eval("CurrentDriverNumberSource.Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<data:HyperLinkField HeaderText="Service" ControlStyle-ForeColor="Black" DataContainer="ServiceTypeIdSource"
DataTextField="Description" />
<data:HyperLinkField HeaderText="Vehicle" ControlStyle-ForeColor="Black" DataContainer="VehicleTypeIdSource"
DataTextField="Description" />
<asp:TemplateField HeaderText="Status" HeaderStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblStatus" runat="server" Text='<%#Eval("StatusID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TotalAmount" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblAmount" runat="server" Text='<%# Eval("TotalAmount","{0:C2}")%>' ></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<b>No Active Orders Found!</b>
</EmptyDataTemplate>
</data:EntityGridView>
对于数据源,我使用它
<data:ActiveOrdersDataSource ID="ActiveOrdersDataSourcebyCompany" runat="server" SelectMethod="GetPaged" EnablePaging="True" EnableSorting="True" EnableDeepLoad="True">
<DeepLoadProperties Method="IncludeChildren" Recursive="False">
<Types>
<data:ActiveOrdersProperty Name="Clients" />
<data:ActiveOrdersProperty Name="Companies" />
<data:ActiveOrdersProperty Name="Drivers" />
<data:ActiveOrdersProperty Name="SalesPeople" />
<data:ActiveOrdersProperty Name="ServiceTypes" />
<data:ActiveOrdersProperty Name="VehicleTypes" />
<data:ActiveOrdersProperty Name="Zones" />
</Types>
</DeepLoadProperties>
<Parameters>
<asp:SessionParameter Name="CompanyId" SessionField="CompanyId" Type="String" />
<data:SqlParameter Name="WhereClause" UseParameterizedFilters ="false">
<Filters>
<%--<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex"
Type="Int32" />
<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize"
Type="Int32" />
<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />--%>
</Parameters>
</data:ActiveOrdersDataSource>