我有一个带有自定义表单的列表定义,以显示我的所有列表项。
我添加了2个控件来过滤我的视图。我希望这些仅在用户选择值后影响结果。目前,视图正在按控件的默认值进行过滤,而不显示所有项目。我应该改变这个吗?
<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>
答案 0 :(得分:0)
为实现这一目标,我创建了2个视图,1)AllItems.aspx,2)FilteredItems.aspx。我的控件重定向到PostBack上的FilteredItems.aspx并保留选定的值。 CAML使用所选值来过滤视图。