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. Serious GridView Problem!

Serious GridView Problem!

Scheduled Pinned Locked Moved ASP.NET
helpcssdatabasewpfwcf
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.
  • S Offline
    S Offline
    Sheel Gohe
    wrote on last edited by
    #1

    Hello Friends, I am facing a serious gridview problem, I am binding my gridview from code behind like(myGridView.DataSource=myDataSet; myGridView.DataBind()). But the problem is when i click the inbuilt "edit" button of the grid and the rows comes to edit mode, I cant able to get the cell values in any of the event like row_updating etc. For all the "rows(index)cells(index).Text" its displaying the blank text "". I am not able to figure out what the problem is. Please help me out friends.... I have tried all of these commands: 1). lblMessage.Text = CType(CType(e.CommandSource, LinkButton).NamingContainer, GridViewRow).Cells(4).Text 2). Dim m_ColumnText As String m_ColumnText = GV1.Rows(GV1.EditIndex).Cells(4).Text 3). lblMessage.Text = Server.HtmlDecode(row.Cells(4).Text) All are showing blank text, but i have values in my grid cells i can see it from my eyes.....i am very frustrated....plz...plz...help me out. Thanks in advance. :confused: Sheel Gohe

    M 1 Reply Last reply
    0
    • S Sheel Gohe

      Hello Friends, I am facing a serious gridview problem, I am binding my gridview from code behind like(myGridView.DataSource=myDataSet; myGridView.DataBind()). But the problem is when i click the inbuilt "edit" button of the grid and the rows comes to edit mode, I cant able to get the cell values in any of the event like row_updating etc. For all the "rows(index)cells(index).Text" its displaying the blank text "". I am not able to figure out what the problem is. Please help me out friends.... I have tried all of these commands: 1). lblMessage.Text = CType(CType(e.CommandSource, LinkButton).NamingContainer, GridViewRow).Cells(4).Text 2). Dim m_ColumnText As String m_ColumnText = GV1.Rows(GV1.EditIndex).Cells(4).Text 3). lblMessage.Text = Server.HtmlDecode(row.Cells(4).Text) All are showing blank text, but i have values in my grid cells i can see it from my eyes.....i am very frustrated....plz...plz...help me out. Thanks in advance. :confused: Sheel Gohe

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, What does your gridview look like? What is the column 4? If the cell 4 simply contains an input control like Textbox in Edit mode, the Text property returns empty.

      S 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, What does your gridview look like? What is the column 4? If the cell 4 simply contains an input control like Textbox in Edit mode, the Text property returns empty.

        S Offline
        S Offline
        Sheel Gohe
        wrote on last edited by
        #3

        Yes minhpc_bk, the cell 4 simply contains an input control like Textbox in Edit mode, and the Text property returns empty string "".... Do you know the cause!! Sheel Gohe

        M 1 Reply Last reply
        0
        • S Sheel Gohe

          Yes minhpc_bk, the cell 4 simply contains an input control like Textbox in Edit mode, and the Text property returns empty string "".... Do you know the cause!! Sheel Gohe

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          Sheel Gohe wrote:

          Do you know the cause!!

          Yes, :). In Edit mode, the cell does not contain text, but a text box so that the user can input the value, so the Text property of the cell should be empty. And if you want to access the value, you should cast the child control contained in the Controls collection of the cell 4 (.Controls[0]) to the TextBox control, then access the Text property of the textbox.

          S 1 Reply Last reply
          0
          • M minhpc_bk

            Sheel Gohe wrote:

            Do you know the cause!!

            Yes, :). In Edit mode, the cell does not contain text, but a text box so that the user can input the value, so the Text property of the cell should be empty. And if you want to access the value, you should cast the child control contained in the Controls collection of the cell 4 (.Controls[0]) to the TextBox control, then access the Text property of the textbox.

            S Offline
            S Offline
            Sheel Gohe
            wrote on last edited by
            #5

            Thanks minhpc_bk, You made my day....I wanted to give many thanks to you....God bless you... :) Sheel Gohe

            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