Solved

ListView Column Filtering (Urgent)

Posted on 2004-04-01
3
246 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
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…

746 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

11 Experts available now in Live!

Get 1:1 Help Now