Solved

ListView Column Filtering (Urgent)

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ddeman not working in activex 3 103
Newbie Thread Programming 1 152
how to center only a line in richedit? 4 57
Delphi selector screen 2 79
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 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