简体   繁体   English

列表定义 - AllItems.aspx 的视图 - 我如何显示包含所有项目的视图,然后让用户过滤结果

[英]List definition - View for AllItems.aspx - How can i display the view with all items and then let the user filter the results

I have a list definition with a custom form to display all my list items.我有一个带有自定义表单的列表定义来显示我的所有列表项。

I have added 2 controls to filter my view.我添加了 2 个控件来过滤我的视图。 I want these only to affect the results once the user has chosen a value.一旦用户选择了一个值,我希望这些只影响结果。 Currently the view is being filtered by the default values of the control and not displaying all the items.目前,视图被控件的默认值过滤,并且不显示所有项目。 Should i alter the caml to allow this?我应该改变caml来允许这个吗?

 <View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE"
        MobileDefaultView="TRUE"
        SetupPath="pages\toyotatemplate\marketpgviewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx" >
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">10</RowLimit>
    <ViewFields>
      <FieldRef Name="LinkTitle" ></FieldRef>
      <FieldRef Name="MarketplaceCategories"></FieldRef>
      <FieldRef Name="Author"/>
      <FieldRef Name="Created" Format="{dd/mm/yyyy}"/>
      <FieldRef Name="MarketplaceSubCategories"></FieldRef>
      <FieldRef Name="Locations"></FieldRef>
      <FieldRef Name="MarketplaceItemExpiryDate" Format="{dd/mm/yyyy}"></FieldRef>
    </ViewFields>
    <Query>
      <OrderBy>
        <FieldRef Name="ID" Ascending="False" />
      </OrderBy>
    </Query>
    <ParameterBindings>
      <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
      <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
      <ParameterBinding Name="MarketplaceCategories" Location="Control(tcCategories, SelectedItem)"/>
      <ParameterBinding Name="MarketplaceSubcategories" Location="Control(tcSubCategories, SelectedItem)"/>
    </ParameterBindings>
  </View>

To achieve this, I created 2 views:为此,我创建了 2 个视图:

  1. AllItems.aspx所有项目.aspx
  2. FilteredItems.aspx.过滤项目.aspx。

My control redirects to FilteredItems.aspx on the PostBack and keeps the selected value.我的控件重定向到 PostBack 上的 FilteredItems.aspx 并保留所选值。 The CAML uses the selected value to filter the view. CAML 使用选定的值来过滤视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在SharePoint Designer 2010 AllItems.aspx xslt视图中计算列 - Compute columns in SharePoint Designer 2010 AllItems.aspx xslt view SharePoint 2013在allitems.aspx中我如何获取列表标题和名称 - SharePoint 2013 In allitems.aspx How Do I get the list title and Name 如何覆盖 Upload.aspx 或 AllItems.aspx 等 SharePoint 2013(不是 SP 设计器) - How can you override Upload.aspx or AllItems.aspx etc. SharePoint 2013 (NOT SP Designer) 如何为 ClientContext 正确删除 SitePages/Home.aspx 或 Forms/AllItems.aspx? - How do I remove SitePages/Home.aspx or Forms/AllItems.aspx correctly for ClientContext? SharePoint Hosted App 2013:自定义List / AllItems.aspx页 - SharePoint Hosted App 2013: Customize List/AllItems.aspx page 将AllItems.aspx显示为Web部件? - Displaying the AllItems.aspx as a Web Part? Sharepoint 在“AllItems.aspx”中显示(不完整)ID - Sharepoint shows (incomplete) id in “AllItems.aspx” SharePoint Office365 Powershell Webpart AllItems.aspx - SharePoint Office365 Powershell Webpart AllItems.aspx 如何修改自定义字段在共享点列表(allibms视图)上的外观? - How to modify how the custom field looks on sharepoint list (allitems view)? 我的子站点中缺少pages / forms / allitems.aspx - pages/forms/allitems.aspx missing from my sub site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM