Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. find Duplicate record in listView using C#

find Duplicate record in listView using C#

Scheduled Pinned Locked Moved Mobile
csharptutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mathy
    wrote on last edited by
    #1

    hai all, How to find a duplicate record in list view...using C# for smartdevices... Am reading a no's of records from outside... If the record's is already present in my listview, just increment a count for particular record’s don’t want add it again. (avoid the duplication but keep on counting) How should I proceed…

    Best Regard's Mathy's

    J 1 Reply Last reply
    0
    • M mathy

      hai all, How to find a duplicate record in list view...using C# for smartdevices... Am reading a no's of records from outside... If the record's is already present in my listview, just increment a count for particular record’s don’t want add it again. (avoid the duplication but keep on counting) How should I proceed…

      Best Regard's Mathy's

      J Offline
      J Offline
      jk chan
      wrote on last edited by
      #2

      put a loop and over listview items. then you can start counting duplicate items right ? is that complex ? :)

      If u can Dream... U can do it

      M 1 Reply Last reply
      0
      • J jk chan

        put a loop and over listview items. then you can start counting duplicate items right ? is that complex ? :)

        If u can Dream... U can do it

        M Offline
        M Offline
        mathy
        wrote on last edited by
        #3

        hai jk The list of items is more, if i using a loop its eating a time... and also am read the data continuously, it may be the same item… am using 3 columns 1. No’s of items 2. items id 3. repeated count of same items… so each items have its own count… if detected the same item just increment the count. plz tell me any other way..

        Best Regard's Mathy's

        J 1 Reply Last reply
        0
        • M mathy

          hai jk The list of items is more, if i using a loop its eating a time... and also am read the data continuously, it may be the same item… am using 3 columns 1. No’s of items 2. items id 3. repeated count of same items… so each items have its own count… if detected the same item just increment the count. plz tell me any other way..

          Best Regard's Mathy's

          J Offline
          J Offline
          jk chan
          wrote on last edited by
          #4

          ok , in that case say you have an array of items , ITEM[] MyItems, for each item in the list you can count the frequency , like MyItems[itemid].freq++; in the next loop u can check for items whose freq is > 1 then,thats it You canfind the duplicate record in O(n) time complexity.

          If u can Dream... U can do it

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups