Xceed Ultimate ListBox for Silverlight Documentation
FilterExpression Property (ListBox)
Example 


Gets or sets the filter expression, which is embedded into the data query that is used to request data and filter the items that are displayed in a listbox.
Syntax
Public Property FilterExpression As FilterExpressionBase
Dim instance As ListBox
Dim value As FilterExpressionBase
 
instance.FilterExpression = value
 
value = instance.FilterExpression
public FilterExpressionBase FilterExpression {get; set;}

Property Value

A FilterExpressionBase representing the filter expression, which is embedded into the data query that is used to request data and filter the items that are displayed in a listbox.
Remarks
The FilterExpression property is explicitly linked to the search text box displayed in a listbox. When a filter expression is provided through the FilterExpression property, it will be visually represented in the search text box, if one is present. If the values in the search text box are modified, the value of the FilterExpression property will also be modified to reflect the changes. Complex filter expressions, such as those that use inline logical filter expressions, cannot be represented in the search text box. In these cases, multiple number signs (####) will be displayed in the SearchTextBox.
Example

 

<sllb:ListBox.FilterExpression>
   <!-- Predefine a FilterExpression representing: (OrderID >= 10251) && (ShipCountry == 'USA') -->
   <sllb:AndFilterExpression>
      <sllb:FilterExpression MemberName="OrderID"
                             FilterOperator="GreaterThanOrEqual">
         <sllb:FilterExpression.Value>
            <s:Int32>10251</s:Int32>
         </sllb:FilterExpression.Value>
      </sllb:FilterExpression>

      <sllb:FilterExpression MemberName="ShipCountry"
                             FilterOperator="Equal">
         <sllb:FilterExpression.Value>
            <s:String>USA</s:String>
         </sllb:FilterExpression.Value>
      </sllb:FilterExpression>
   </sllb:AndFilterExpression>
</sllb:ListBox.FilterExpression>
sldgListBoxControl.FilterExpression = New FilterExpression( "ShipCity", FilterOperator.LessThan, "N" )
sldgListBoxControl.FilterExpression = new FilterExpression( "ShipCity", FilterOperator.LessThan, "N" );
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ListBox Class
ListBox Members

Send Feedback