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. Gridview blanks cell returns &nbsp !!!

Gridview blanks cell returns &nbsp !!!

Scheduled Pinned Locked Moved ASP.NET
question
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.
  • K Offline
    K Offline
    kindman_nb
    wrote on last edited by
    #1

    hi when I tried to get the value of current row of the gridview, the blank cell return   , how can I prevent that ? thanks

    jooooo

    P 1 Reply Last reply
    0
    • K kindman_nb

      hi when I tried to get the value of current row of the gridview, the blank cell return   , how can I prevent that ? thanks

      jooooo

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      Can you post here a block of code and grid event name in which you are trying to get it ?

      Parwej Ahamad R & D: REST services with WCF

      K 1 Reply Last reply
      0
      • P Parwej Ahamad

        Can you post here a block of code and grid event name in which you are trying to get it ?

        Parwej Ahamad R & D: REST services with WCF

        K Offline
        K Offline
        kindman_nb
        wrote on last edited by
        #3

        thanks my friend the event : GridView1_RowCommand switch(e.CommandName) { case ("Edit"): GridViewRow row = (GridViewRow)((Control)e.CommandSource).Parent.Parent; txtID.Text = row.Cells[0].Text; txtName.Text = row.Cells[1].Text; } then if the cell is blank it's return & nbsp

        jooooo

        P 1 Reply Last reply
        0
        • K kindman_nb

          thanks my friend the event : GridView1_RowCommand switch(e.CommandName) { case ("Edit"): GridViewRow row = (GridViewRow)((Control)e.CommandSource).Parent.Parent; txtID.Text = row.Cells[0].Text; txtName.Text = row.Cells[1].Text; } then if the cell is blank it's return & nbsp

          jooooo

          P Offline
          P Offline
          Parwej Ahamad
          wrote on last edited by
          #4

          Please try this way for getting the current row:

            int index = Convert.ToInt32(e.CommandArgument);    
            GridViewRow row = YourGridView.Rows\[index\];
            txtID.Text = row.Cells\[0\].Text);
            ...................
          

          Parwej Ahamad R & D: REST services with WCF

          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