Solved

ListView Column Filtering (Urgent)

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

Technology Partners: 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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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