CatalogSearchOptions.PropertiesToReturn Property (BCL)
The PropertiesToReturn property is a string that gets or sets property names that should be returned in a query result set.
Definition
[Visual Basic .NET]
Public Property PropertiesToReturn As System.String
[C#]
public System.String PropertiesToReturn{get; set;}
Property Value
A String object containing a comma-delimited list of property names.
Remarks
The default value is null, indicating to return all properties.
Example
Use the following code to return a column named UnitPrice that can be bound to a control. The UnitPrice column contains the price per unit of the product, calculated by dividing the cy_list_price by the number of units. If Units is set to zero, the UnitPrice is the same as the cy_list_price. This sample assumes that you have a user-defined property named Units that stores the number of units that are sold for the given cy_list_price price.
[Visual Basic .NET]
Dim searchOptions As New CatalogSearchOptions()
searchOptions.PropertiesToReturn = "(cy_list_price/isnull(nullif(Units,0),1))UnitPrice, PID"
DataSet ds = cat.GetProducts(searchOptions)
[C#]
CatalogSearchOptions searchOptions = new CatalogSearchOptions();
searchOptions.PropertiesToReturn = "(cy_list_price/isnull(nullif(Units,0),1))UnitPrice, PID";
DataSet ds = cat.GetProducts(searchOptions);
Requirements
Namespace: Microsoft.CommerceServer.Runtime.Catalog
Platforms: Windows 2000, Windows Server 2003
Assembly: Microsoft.CommerceServer.Runtime.dll
Copyright © 2005 Microsoft Corporation.
All rights reserved.