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. need an example

need an example

Scheduled Pinned Locked Moved C#
tutorialcsharpdatabasesql-serversysadmin
3 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.
  • E Offline
    E Offline
    eyalso
    wrote on last edited by
    #1

    hi i need an example how to work with datagrid in C# lets say i have table in SQL server that called Stock_ID and one of the collumn is Symbol how can i get the value of the Symbol from the datagrid lets say i awnt to display all Symbols thanks eyalso

    D Z 2 Replies Last reply
    0
    • E eyalso

      hi i need an example how to work with datagrid in C# lets say i have table in SQL server that called Stock_ID and one of the collumn is Symbol how can i get the value of the Symbol from the datagrid lets say i awnt to display all Symbols thanks eyalso

      D Offline
      D Offline
      Dario Solera
      wrote on last edited by
      #2

      .NET 1.1: MSDN - DataGrid[^] .NET 2.0: MSDN2 - DataGridView[^] ___________________________________ Tozzi is right: Gaia is getting rid of us. My Blog [ITA]

      1 Reply Last reply
      0
      • E eyalso

        hi i need an example how to work with datagrid in C# lets say i have table in SQL server that called Stock_ID and one of the collumn is Symbol how can i get the value of the Symbol from the datagrid lets say i awnt to display all Symbols thanks eyalso

        Z Offline
        Z Offline
        ZhengqiangLin
        wrote on last edited by
        #3

        protected void get_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("server=lzq;database=pubs;uid=sa;pwd="); SqlDataAdapter da = new SqlDataAdapter("select * from lzq", conn); DataSet ds = new DataSet(); da.Fill(ds, "t1"); datagrid1.DataSource = ds.Tables["t1"].DefaultView; datagrid1.DataBind(); }

        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