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. Refresh DataGrid with Latest Values

Refresh DataGrid with Latest Values

Scheduled Pinned Locked Moved C#
cssdatabasequestion
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.
  • R Offline
    R Offline
    ramdil
    wrote on last edited by
    #1

    Hi all I am populating a datagrid with details directly from the database. now i some new insertion is done in database, the grid should be refreshed..so i am again calling load method to repopulate the grid.Can i refresh the grid with only latest changes that means i dont want to reload the entire data instead i need to load recent data and should be appended to the grid .Is it possible if possible how can i do it Thanks in advance

    Regards DilipRam

    D 1 Reply Last reply
    0
    • R ramdil

      Hi all I am populating a datagrid with details directly from the database. now i some new insertion is done in database, the grid should be refreshed..so i am again calling load method to repopulate the grid.Can i refresh the grid with only latest changes that means i dont want to reload the entire data instead i need to load recent data and should be appended to the grid .Is it possible if possible how can i do it Thanks in advance

      Regards DilipRam

      D Offline
      D Offline
      Drew McGhie
      wrote on last edited by
      #2

      You probably want to take a look at the BindingSource[^] class. It should handle what you're looking for.

      R 1 Reply Last reply
      0
      • D Drew McGhie

        You probably want to take a look at the BindingSource[^] class. It should handle what you're looking for.

        R Offline
        R Offline
        ramdil
        wrote on last edited by
        #3

        Thanks for the reply,but since i am loading the data into a datatable and using the datatable count i am adding new row to the grid..so how can i used biniding concept here.can any one help me here

        Regards DilipRam

        D 1 Reply Last reply
        0
        • R ramdil

          Thanks for the reply,but since i am loading the data into a datatable and using the datatable count i am adding new row to the grid..so how can i used biniding concept here.can any one help me here

          Regards DilipRam

          D Offline
          D Offline
          Drew McGhie
          wrote on last edited by
          #4

          The bindingsource does all that for you. When you update the underlying dataset, it updates anything the bindingsource is linked to.

          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