ComponentOne ListView for ASP.NET Web Forms
Task-Based Help / Using the Filter and Search Functions / Using the FilterText Property
In This Topic
    Using the FilterText Property
    In This Topic

    The FilterText property allows you to search against content other than your C1ListViewItems. Using the application you created in the Setting the Filter Function topic, complete the following steps:

    1. Edit the C1ListView control using markup similar to the following. Note that the FilterText property is set for some of the C1ListViewItems:
      
      <cc1:C1ListView ID="C1ListView1" runat="server" Filter="true" Inset="true">
                          <Items>
                              <cc1:C1ListViewLinkItem Text="The Godfather" FilterText="Crime"></cc1:C1ListViewLinkItem>
                              <cc1:C1ListViewLinkItem Text="The Good, the Bad and the Ugly" FilterText="Adventure"></cc1:C1ListViewLinkItem>
                              <cc1:C1ListViewLinkItem Text="12 Angry Men" FilterText="Crime"></cc1:C1ListViewLinkItem>
                              <cc1:C1ListViewLinkItem Text="One Flew Over the Cuckoo's Nest" FilterText="Adventure"></cc1:C1ListViewLinkItem>
                              <cc1:C1ListViewLinkItem Text="Star Wars: Episode V - The Empire Strikes Back" FilterText="sci-fi"></cc1:C1ListViewLinkItem>
                              <cc1:C1ListViewLinkItem Text="The Dark Knight" FilterText="Adventure"></cc1:C1ListViewLinkItem>
                          </Items>
       </cc1:C1ListView>
      
      
    2. Press F5 or start debugging to run your application. Type "Adventure" into the search bar; the results should resemble the following image:

    See Also