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. General Programming
  3. C#
  4. Search in DataGridView

Search in DataGridView

Scheduled Pinned Locked Moved C#
questiontutorial
6 Posts 4 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.
  • L Offline
    L Offline
    Laji59
    wrote on last edited by
    #1

    How can I search in a DataGridView ? I have a DataGridView that has eight column.(for example this datagrid shows some information about 5000 E_Books).One of these eight column is about "Subjetc" and it can made of tow or three subject that delimited with "#" from each other : Example = "Metaphysics # Epistemology". Now I want to search Epistemology in this datagrid so that I can see this record ( "Metaphysics # Epistemology" ) as an answer of my search How can I do it? Thanks in advance

    Hello Friends

    V L N 3 Replies Last reply
    0
    • L Laji59

      How can I search in a DataGridView ? I have a DataGridView that has eight column.(for example this datagrid shows some information about 5000 E_Books).One of these eight column is about "Subjetc" and it can made of tow or three subject that delimited with "#" from each other : Example = "Metaphysics # Epistemology". Now I want to search Epistemology in this datagrid so that I can see this record ( "Metaphysics # Epistemology" ) as an answer of my search How can I do it? Thanks in advance

      Hello Friends

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      hi Laji59 See this and dont forget to vote http://www.codeproject.com/KB/cs/N-Tier22.aspx[^] Hope it helps

      Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

      L 1 Reply Last reply
      0
      • L Laji59

        How can I search in a DataGridView ? I have a DataGridView that has eight column.(for example this datagrid shows some information about 5000 E_Books).One of these eight column is about "Subjetc" and it can made of tow or three subject that delimited with "#" from each other : Example = "Metaphysics # Epistemology". Now I want to search Epistemology in this datagrid so that I can see this record ( "Metaphysics # Epistemology" ) as an answer of my search How can I do it? Thanks in advance

        Hello Friends

        L Offline
        L Offline
        lisan_al_ghaib
        wrote on last edited by
        #3

        Hello, There are many ways to make search. Is your datagrid based on a Data Model? My Advice is to bind your search results on your data model objects. List for example. Dont try te retreive information from your datagridview (assume that it's only to display) you can make for example a SearchClass that look for key words:

        class SerachEbooksClass 
        {
          public static List GetEBooksByKeyWords (string [] keyWords, List ebookList)
          {
             //..do some search stuff
          }
        }
        

        This method is quite heavy if you got a very huge list You can make an index for your ebooks e.g. keywork1=>ebook1,ebook2,ebook3 keywork2=>ebook2,ebook100,ebook50 ... keyworkn=>ebook4,ebook1,ebook66 try to consult this index when searching for ebooks ! * hope this helped you

        L 1 Reply Last reply
        0
        • V Vimalsoft Pty Ltd

          hi Laji59 See this and dont forget to vote http://www.codeproject.com/KB/cs/N-Tier22.aspx[^] Hope it helps

          Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

          L Offline
          L Offline
          Laji59
          wrote on last edited by
          #4

          thanks but download link is empty also I don`t want to RESTRICT datagrid to on answer ; I want to go to the first record that has special conditions and high_light it

          Hello Friends

          1 Reply Last reply
          0
          • L lisan_al_ghaib

            Hello, There are many ways to make search. Is your datagrid based on a Data Model? My Advice is to bind your search results on your data model objects. List for example. Dont try te retreive information from your datagridview (assume that it's only to display) you can make for example a SearchClass that look for key words:

            class SerachEbooksClass 
            {
              public static List GetEBooksByKeyWords (string [] keyWords, List ebookList)
              {
                 //..do some search stuff
              }
            }
            

            This method is quite heavy if you got a very huge list You can make an index for your ebooks e.g. keywork1=>ebook1,ebook2,ebook3 keywork2=>ebook2,ebook100,ebook50 ... keyworkn=>ebook4,ebook1,ebook66 try to consult this index when searching for ebooks ! * hope this helped you

            L Offline
            L Offline
            Laji59
            wrote on last edited by
            #5

            Thanks But don`t you have any other solution?

            Hello Friends

            1 Reply Last reply
            0
            • L Laji59

              How can I search in a DataGridView ? I have a DataGridView that has eight column.(for example this datagrid shows some information about 5000 E_Books).One of these eight column is about "Subjetc" and it can made of tow or three subject that delimited with "#" from each other : Example = "Metaphysics # Epistemology". Now I want to search Epistemology in this datagrid so that I can see this record ( "Metaphysics # Epistemology" ) as an answer of my search How can I do it? Thanks in advance

              Hello Friends

              N Offline
              N Offline
              nelsonpaixao
              wrote on last edited by
              #6

              Hi, Do it in sql and trigger it in c#, by way for me. :laugh:

              nelsonpaixao@yahoo.com.br

              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