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. textbox in grid

textbox in grid

Scheduled Pinned Locked Moved ASP.NET
cssdatabasedesignhelp
5 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.
  • D Offline
    D Offline
    david boon
    wrote on last edited by
    #1

    hi, i have a txtbox in grid where user gives the input.i have to store the text into database. but iam unable to get the text. this is code iam using: Dim TxtBox As TextBox = CType(DataGrid1.Items(count).FindControl("TxtTimings"), System.Web.UI.WebControls.TextBox) Dim Timing As String = TxtBox.Text Response.Write(timing) please help Thanks and Regards, David Boon.

    P 2 Replies Last reply
    0
    • D david boon

      hi, i have a txtbox in grid where user gives the input.i have to store the text into database. but iam unable to get the text. this is code iam using: Dim TxtBox As TextBox = CType(DataGrid1.Items(count).FindControl("TxtTimings"), System.Web.UI.WebControls.TextBox) Dim Timing As String = TxtBox.Text Response.Write(timing) please help Thanks and Regards, David Boon.

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Are you getting an error? Where is this code running (in datagrid command event or after a button click?)

      D 1 Reply Last reply
      0
      • P Paddy Boyd

        Are you getting an error? Where is this code running (in datagrid command event or after a button click?)

        D Offline
        D Offline
        david boon
        wrote on last edited by
        #3

        hi, the code is written in button click event. iam not getting any error. the value is null and no action takes place

        1 Reply Last reply
        0
        • D david boon

          hi, i have a txtbox in grid where user gives the input.i have to store the text into database. but iam unable to get the text. this is code iam using: Dim TxtBox As TextBox = CType(DataGrid1.Items(count).FindControl("TxtTimings"), System.Web.UI.WebControls.TextBox) Dim Timing As String = TxtBox.Text Response.Write(timing) please help Thanks and Regards, David Boon.

          P Offline
          P Offline
          Paddy Boyd
          wrote on last edited by
          #4

          Dim TxtBox As TextBox = CType(DataGrid1.Items(count).Cells(indexOfCellWIthTextBox).FindControl("TxtTimings"), System.Web.UI.WebControls.TextBox) I think that's the syntax - you could give that a try.

          D 1 Reply Last reply
          0
          • P Paddy Boyd

            Dim TxtBox As TextBox = CType(DataGrid1.Items(count).Cells(indexOfCellWIthTextBox).FindControl("TxtTimings"), System.Web.UI.WebControls.TextBox) I think that's the syntax - you could give that a try.

            D Offline
            D Offline
            david boon
            wrote on last edited by
            #5

            i have tried still not working

            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