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

Datagrid

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasesysadminhelp
6 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.
  • S Offline
    S Offline
    smitab
    wrote on last edited by
    #1

    Hi thr, i m facein problem related 2 datagrid.. i m useing asp.net 1.0 and sqlServer. i want 2 access data in datagrid i have writtent d code as private void Page_Load(object sender, System.EventArgs e) { myconnection = new SqlConnection("server=trainee2;"+ "database=northwind;Trusted_Connection=Yes"); myCommand = new SqlDataAdapter("SELECT " + " * FROM user_master", myconnection); DataSet ds = new DataSet(); myCommand.Fill(ds); DataView source = new DataView(ds.Tables[0]); MyDataGrid.DataSource = source ; MyDataGrid.DataBind(); But i cant view the data..there is no err on page sam.

    V 1 Reply Last reply
    0
    • S smitab

      Hi thr, i m facein problem related 2 datagrid.. i m useing asp.net 1.0 and sqlServer. i want 2 access data in datagrid i have writtent d code as private void Page_Load(object sender, System.EventArgs e) { myconnection = new SqlConnection("server=trainee2;"+ "database=northwind;Trusted_Connection=Yes"); myCommand = new SqlDataAdapter("SELECT " + " * FROM user_master", myconnection); DataSet ds = new DataSet(); myCommand.Fill(ds); DataView source = new DataView(ds.Tables[0]); MyDataGrid.DataSource = source ; MyDataGrid.DataBind(); But i cant view the data..there is no err on page sam.

      V Offline
      V Offline
      vinod_dan
      wrote on last edited by
      #2

      u havent opened ur connection. myconnection.open hope it helps

      S 1 Reply Last reply
      0
      • V vinod_dan

        u havent opened ur connection. myconnection.open hope it helps

        S Offline
        S Offline
        smitab
        wrote on last edited by
        #3

        I had already given dat. sam.

        E 1 Reply Last reply
        0
        • S smitab

          I had already given dat. sam.

          E Offline
          E Offline
          enjoycrack
          wrote on last edited by
          #4

          Are you sure there is no exception? Just try to debug step by step and one thing make sure the table has data << >>

          V 1 Reply Last reply
          0
          • E enjoycrack

            Are you sure there is no exception? Just try to debug step by step and one thing make sure the table has data << >>

            V Offline
            V Offline
            vinod_dan
            wrote on last edited by
            #5

            where did u give the myconnection.open line???? try giving it after u have defined the connection... -- modified at 1:34 Wednesday 22nd February, 2006

            S 1 Reply Last reply
            0
            • V vinod_dan

              where did u give the myconnection.open line???? try giving it after u have defined the connection... -- modified at 1:34 Wednesday 22nd February, 2006

              S Offline
              S Offline
              smitab
              wrote on last edited by
              #6

              i think if i m using disconnected architech. then no need to open connection sam.

              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