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. How to Clear GridView

How to Clear GridView

Scheduled Pinned Locked Moved ASP.NET
helptutorial
4 Posts 3 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.
  • A Offline
    A Offline
    aaraaayen 0
    wrote on last edited by
    #1

    Hi Friends, For some purpose i need to clear gridview ( remove all row) before i re bind the gridview. But i cant find how to clear it.Please Help. Thanks in Advance , Best Regards,

    Prya

    S V 2 Replies Last reply
    0
    • A aaraaayen 0

      Hi Friends, For some purpose i need to clear gridview ( remove all row) before i re bind the gridview. But i cant find how to clear it.Please Help. Thanks in Advance , Best Regards,

      Prya

      S Offline
      S Offline
      Sebastien Lachance
      wrote on last edited by
      #2

      GridView.DataSource = null; GridView.DataBind(); There may also be other ways.

      My Blog

      modified on Tuesday, February 2, 2010 7:03 AM

      A 1 Reply Last reply
      0
      • A aaraaayen 0

        Hi Friends, For some purpose i need to clear gridview ( remove all row) before i re bind the gridview. But i cant find how to clear it.Please Help. Thanks in Advance , Best Regards,

        Prya

        V Offline
        V Offline
        Venkatesh Mookkan
        wrote on last edited by
        #3

        Hey Prya, There is no need to clear the GridView before you bind, because GridView normally does clearing. I think you are using DataSet as DataSource of the GridView which is to be cleared.

        Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group

        1 Reply Last reply
        0
        • S Sebastien Lachance

          GridView.DataSource = null; GridView.DataBind(); There may also be other ways.

          My Blog

          modified on Tuesday, February 2, 2010 7:03 AM

          A Offline
          A Offline
          aaraaayen 0
          wrote on last edited by
          #4

          Hi Sebastien, Thanks a lot. Its working. Regards,

          Prya

          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