Solved

ListView Column Filtering (Urgent)

Posted on 2004-04-01
3
253 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
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
shaneholmes earned 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A short film showing how OnPage and Connectwise integration works.

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now