[英]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 个视图:
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.