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. DataGridView

DataGridView

Scheduled Pinned Locked Moved C#
helpannouncement
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.
  • A Offline
    A Offline
    Assaf82
    wrote on last edited by
    #1

    I update the DataSet but the DataGridView still show me the old Data This my Code : adap.SelectCommand = cmd; ds.Tables.Remove("CreditCardInfo"); adap.Fill(ds, "CreditCardInfo"); dtgCreditInfo.DataSource = ds; dtgCreditInfo.DataMember = "CreditCardInfo"; dtgCreditInfo.Update(); Please i need help, it's urgent Thanks so much

    Assaf

    T 1 Reply Last reply
    0
    • A Assaf82

      I update the DataSet but the DataGridView still show me the old Data This my Code : adap.SelectCommand = cmd; ds.Tables.Remove("CreditCardInfo"); adap.Fill(ds, "CreditCardInfo"); dtgCreditInfo.DataSource = ds; dtgCreditInfo.DataMember = "CreditCardInfo"; dtgCreditInfo.Update(); Please i need help, it's urgent Thanks so much

      Assaf

      T Offline
      T Offline
      T EDY
      wrote on last edited by
      #2

      I'm sorry Assaf, what exactly u want to do ? if u want to get the latest data why dont u use datatable.

      Regards, Tomi

      A 1 Reply Last reply
      0
      • T T EDY

        I'm sorry Assaf, what exactly u want to do ? if u want to get the latest data why dont u use datatable.

        Regards, Tomi

        A Offline
        A Offline
        Assaf82
        wrote on last edited by
        #3

        I have alredy the data in the dataset, the data i want to display in the datagridview i have it but the datagridview still show me the old data "You mean to fill the datatable from the adap and reuse instead of the dataset?" Thanks a lot -- modified at 1:32 Monday 10th September, 2007

        Assaf

        T 1 Reply Last reply
        0
        • A Assaf82

          I have alredy the data in the dataset, the data i want to display in the datagridview i have it but the datagridview still show me the old data "You mean to fill the datatable from the adap and reuse instead of the dataset?" Thanks a lot -- modified at 1:32 Monday 10th September, 2007

          Assaf

          T Offline
          T Offline
          T EDY
          wrote on last edited by
          #4

          Yes, if u want to show the latest data then u should use datatable instead dataset For Example : string conect = ConfigurationManager.ConnectionStrings["CON"].ToString(); SqlConnection conn = new SqlConnection(conect); SqlDataAdapter da = new SqlDataAdapter ("Select * From MyTable",conn); DataTable dt = new DataTable(); da.Fill(dt); Hope this can help solve u'r problems :) -- modified at 2:01 Monday 10th September, 2007

          Regards, Tomi

          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