Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

How to filter the record in List View

Last post 04-03-2008 10:51 AM by Han Abr. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-28-2008 12:25 AM

    • Han Abr
    • Not Ranked
    • Joined on 03-28-2008
    • Malaysia
    • New Member
    • Points 30

    How to filter the record in List View

    Dear friends,

    I'm new to VB.net(2005). I want to ask, how can we filter just to show the data in List View in design mode. Example like this situation.

     
    No.         Item.     Occur   

    1              X             10

    2              y              15

    3              X             10

    4              Z              4

    5              X             10

     

    In this case I want to display only like this. No redundant record.

    No.         Item     Occur   

    1              X             10

    2              y              15

    3              Z              4

     
    I believe it can just setting at List View properties but I don’t have any any idea to do it.
    Thank you in advanced.


     

    • Post Points: 10
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 03-28-2008 5:02 AM In reply to

    • MichaelW
    • Not Ranked
    • Joined on 01-31-2008
    • Australia
    • New Member
    • Points 15

    Re: How to filter the record in List View

     Can do this in the SQL?

     SELECT DISTINCT [Occur], [Item], [No] FROM
     

    • Post Points: 10
  • 03-28-2008 10:17 AM In reply to

    • Han Abr
    • Not Ranked
    • Joined on 03-28-2008
    • Malaysia
    • New Member
    • Points 30

    Re: How to filter the record in List View

    MichaelW, Thank you on your respond. Actually I'm not access from DB. Just from .TXT file. I'm scan that file and populate it. I want display it without redundant record. How can I do this ?

    • Post Points: 5
  • 03-30-2008 6:11 AM In reply to

    • Han Abr
    • Not Ranked
    • Joined on 03-28-2008
    • Malaysia
    • New Member
    • Points 30

    Re: How to filter the record in List View

     Hi,

    Anybody can help me to solve this problem. I'm really need to solve it to finished up my course project. 

    • Post Points: 10
  • 03-30-2008 8:48 AM In reply to

    Re: How to filter the record in List View

     Use a DictionaryEntry class or an List generic class to store the lines that you have taken. Use the Item object like the key... now..., before to add the line into the ListView control.. you must to check into the collection for the Item keys using the Contains method. Surely the info into the text file is delimited by a character (i.e. a comma)... You can split the line into an array using the Split method available in the String class. Then, store the first cell or item in the array into a collection that implements the IDictionaryEntry class, to decide if the line will be included into the ListView control (using the Contains or ContainsKey method).

     

    Regards 

    • Post Points: 10
  • 04-03-2008 10:51 AM In reply to

    • Han Abr
    • Not Ranked
    • Joined on 03-28-2008
    • Malaysia
    • New Member
    • Points 30

    Re: How to filter the record in List View

    Dear Friend,

    I'm already solve this problem Thank a lot on your help.Big Smile
     

    • Post Points: 5
Page 1 of 1 (6 items)