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

Session

Scheduled Pinned Locked Moved ASP.NET
helpwpfwcf
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
    A kamath
    wrote on last edited by
    #1

    I have a Datagrid. I am taking a selected row to the datatable(session).My problem is inside the datagrid in one cell there is a textbox. the value from the textbox is not binding to datatable. Can anybody help please.

    C 1 Reply Last reply
    0
    • A A kamath

      I have a Datagrid. I am taking a selected row to the datatable(session).My problem is inside the datagrid in one cell there is a textbox. the value from the textbox is not binding to datatable. Can anybody help please.

      C Offline
      C Offline
      Chetan Ranpariya
      wrote on last edited by
      #2

      Hi, Can you post your code how do u store rows in the session?

      Thanks and Regards, Chetan Ranpariya

      A 1 Reply Last reply
      0
      • C Chetan Ranpariya

        Hi, Can you post your code how do u store rows in the session?

        Thanks and Regards, Chetan Ranpariya

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

        DataTable dt = new DataTable(); dt.Columns.Add("feild1", System.Type.GetType("System.Int32")); dt.Columns.Add("feild2", System.Type.GetType("System.String")); dt.Columns.Add("feild3", System.Type.GetType("System.String")); dt.Columns.Add("feild4", System.Type.GetType("System.String")); dt.AcceptChanges(); DataRow l_rowDetails = dt.NewRow(); l_rowDetails["feild1"] = (GridView1.SelectedRow.Cells[1].Text); l_rowDetails["feild2"] = GridView1.SelectedRow.Cells[2].Text; l_rowDetails["feild3"] = GridView1.SelectedRow.Cells[3].Text; l_rowDetails["feild4"] = GridView1.SelectedRow.Cells[4].Text; dt.Rows.Add(l_rowDetails); dt.AcceptChanges(); Session["datatable"] = dt;

        C 1 Reply Last reply
        0
        • A A kamath

          DataTable dt = new DataTable(); dt.Columns.Add("feild1", System.Type.GetType("System.Int32")); dt.Columns.Add("feild2", System.Type.GetType("System.String")); dt.Columns.Add("feild3", System.Type.GetType("System.String")); dt.Columns.Add("feild4", System.Type.GetType("System.String")); dt.AcceptChanges(); DataRow l_rowDetails = dt.NewRow(); l_rowDetails["feild1"] = (GridView1.SelectedRow.Cells[1].Text); l_rowDetails["feild2"] = GridView1.SelectedRow.Cells[2].Text; l_rowDetails["feild3"] = GridView1.SelectedRow.Cells[3].Text; l_rowDetails["feild4"] = GridView1.SelectedRow.Cells[4].Text; dt.Rows.Add(l_rowDetails); dt.AcceptChanges(); Session["datatable"] = dt;

          C Offline
          C Offline
          Chetan Ranpariya
          wrote on last edited by
          #4

          Hi, Here u r pushing text of the cell. If u want to take value from the textbox then you should find textbox in the cell and then take its text property and insert it in to the table.

          Thanks and Regards, Chetan Ranpariya

          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