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. Web Development
  3. ASP.NET
  4. ASP.NET Gridview, bring highlighted rows to top

ASP.NET Gridview, bring highlighted rows to top

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-netdatabasehelp
6 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.
  • I Offline
    I Offline
    Inderjeet Kaur
    wrote on last edited by
    #1

    I have a grid view which can have any number of records. I have a text box to search for card numbers. I highlight the rows with matching card numbers in RowDataBound event. Now i want to bring the Highlighted rows to top. I do not want to remove all other records. I want to show all records and want to bring highlighted records to top. I urgently need the solution for this query. Any help will be appreciated. Thanks in Advance! Inderjeet Kaur

    Inderjeet Kaur Sr. Software Engg

    G I 2 Replies Last reply
    0
    • I Inderjeet Kaur

      I have a grid view which can have any number of records. I have a text box to search for card numbers. I highlight the rows with matching card numbers in RowDataBound event. Now i want to bring the Highlighted rows to top. I do not want to remove all other records. I want to show all records and want to bring highlighted records to top. I urgently need the solution for this query. Any help will be appreciated. Thanks in Advance! Inderjeet Kaur

      Inderjeet Kaur Sr. Software Engg

      G Offline
      G Offline
      GSingh Developer
      wrote on last edited by
      #2

      could be possible by changing sql query like select * from table1 where column =searchcondition union all select * from table1 where column<> searchcondition.. try it.. in sql first..

      I 1 Reply Last reply
      0
      • G GSingh Developer

        could be possible by changing sql query like select * from table1 where column =searchcondition union all select * from table1 where column<> searchcondition.. try it.. in sql first..

        I Offline
        I Offline
        Inderjeet Kaur
        wrote on last edited by
        #3

        Hey Thanks Alot! It worked. I actually implemented the same thing in my code behind. Tahnks ALot!

        Inderjeet Kaur Sr. Software Engg

        G 1 Reply Last reply
        0
        • I Inderjeet Kaur

          Hey Thanks Alot! It worked. I actually implemented the same thing in my code behind. Tahnks ALot!

          Inderjeet Kaur Sr. Software Engg

          G Offline
          G Offline
          GSingh Developer
          wrote on last edited by
          #4

          ur welcome... Gurinder Singh

          G 1 Reply Last reply
          0
          • G GSingh Developer

            ur welcome... Gurinder Singh

            G Offline
            G Offline
            GSingh Developer
            wrote on last edited by
            #5

            do u have session expiry knowledge... i struct in same question of aman saroya.. (3-4 post below ur..)

            1 Reply Last reply
            0
            • I Inderjeet Kaur

              I have a grid view which can have any number of records. I have a text box to search for card numbers. I highlight the rows with matching card numbers in RowDataBound event. Now i want to bring the Highlighted rows to top. I do not want to remove all other records. I want to show all records and want to bring highlighted records to top. I urgently need the solution for this query. Any help will be appreciated. Thanks in Advance! Inderjeet Kaur

              Inderjeet Kaur Sr. Software Engg

              I Offline
              I Offline
              Inderjeet Kaur
              wrote on last edited by
              #6

              Hi Its workign fine if i have to search for 1 field, If i have to search for 2 fields it fails. How can i handle it... Suppose, user enter a card number and wrong name corresponding to those card numbers. If use AND operator in my query, it will still return records. My gridview is using template, for null records. If the user is making wrong query, i want no records to returned... Can you help me with this.

              Inderjeet Kaur Sr. Software Engg

              modified on Thursday, August 20, 2009 1:10 AM

              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