Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ListView Column Filtering (Urgent)

Posted on 2004-04-01
3
Medium Priority
?
285 Views
Last Modified: 2010-05-18
Hi all,

I need a loop for a ListView that will scroll the contents and filter it.

The first column contains different numbers and i need some code to say for example:

Case of

1: {If a 1 is found} do something
2: {if a 2 is found} do something else etc...

I know how to do it in a Listbox but not in a listview.

The loop must scoll the whole list (one by one)

I need it ASAP please help !!!

thanks

SFern.
0
Comment
Question by:sfern
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
shaneholmes earned 1000 total points
ID: 10734485
var
I, tmp: Integer;

for I:= 0 to ListView1.Items.Count - 1 do
begin
 tmp:=  StrToInt(ListView1.Items[I].Caption);
 case tmp of
  0:begin //do something here end;
  1:begin //do something here end;
  2:begin //do something here end;
 end;
 end;

shane
0
 

Author Comment

by:sfern
ID: 10734604
Thanks very much, it works great :)

SFern
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10734614
<Smile>

Your welcome!

Shane
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question