473,396 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to filter a listview that matches only with a keyword?

this is my line of codes. but it only compares to the equal match on the textbox. is there any way where i can match even just a keyword and will select all items with the same keyword that i type on textbox.

[left]
For i = 0 To ListView1.Items.Count - 1
If ListView1.Items(i).SubItems(1).Text.ToLower = TextBox1.Text.ToLower Then
ListView1.Items(i).Selected = True
ListView1.EnsureVisible(i)
End If
Next
[/right]

tnx in advance!
Apr 24 '11 #1
1 9616
MrMancunian
569 Expert 512MB
You could use
Expand|Select|Wrap|Line Numbers
  1. ListView1.Items(i).SubItems(1).Text.ToLower.Contains(Textbox1.Text.ToLower)
to check if the listviewitem contains your string somewhere.

Steven
May 26 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Peter Otten | last post by:
I'm sure they have been mentioned somewhere but here are some more advantages of a decorator keyword (I use "transform"): - The docstring can be moved to the top of the decorator suite. - Simple...
2
by: pcPirate | last post by:
Hi, Just a simple question. In C# i) Is there a way to filter the items in Listview by characters? Say, if the items are: "AA", "AAA", "AB", when I type "AA", the listview should display only...
1
by: Shaker | last post by:
I was asked recently why the VB.NET With Keyword was not implented in C#, and I couldn't think of an answer. Does anybody have any ideas? Thanks, Andrew Niemann '04, MCP
5
by: Mystilleef | last post by:
Hello, Is there a simple flag to set to allow overlapping matches for the findall() regular expression method? In other words, if a string contains five occurrences of the string pattern "cat",...
10
by: Timothy V | last post by:
Hi, Is there a C# equivelant to VB's with keyword? Thanks, Tim.
1
by: =?Utf-8?B?R3VzIENodWNo?= | last post by:
How can I populate a ListView Box with the current directory, filename, file length, date created and date last modified? I can get the current directory and length by using Dim Path As String =...
8
by: matthewperpick | last post by:
Check out this toy example that demonstrates some "strange" behaviour with keyword arguments and inheritance. ================================= class Parent: def __init__(self, ary = ):...
4
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
I have a winforms application that is supposed to look into a specific directory, popluate a ListView control with the contents of the directory. I am new to this, and have not found the exact...
7
nev
by: nev | last post by:
i declared 2 datatables: dim dtt1 as datatable = ds.datatable1 dim dtt2 as datatable = ds.datatable2 dtt1 has firstname, lastname columns dtt2 has firstname column when i filter dtt1 by...
1
by: =?Utf-8?B?WVhR?= | last post by:
When double-click the listview item with checkbox (View = Details), the checkbox will be checked or unchecked, how to disable this behavior? thank you.
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.