Empty gridview cells and checking for empty string

Discussion in 'ASP .Net' started by Savvoulidis Iordanis, Sep 5, 2008.

  1. In a RowDataBound event, I want to check if a column is empty (it's a simple
    column, not a template with a label in it). I use the following syntax to get
    the value from the cell:

    s = e.row.cells(1).text

    but s returns " " so I can't use String.IsNullOrEmpty(s) function, because
    it's not empty.

    What can I do?

    TIA
    Iordanis
     
    Savvoulidis Iordanis, Sep 5, 2008
    #1
    1. Advertising

  2. The post displayed the value returned from the cell as " ", while it is
    actually & n b s p; when I see it when debugging.
     
    Savvoulidis Iordanis, Sep 5, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Krish

    GridView Empty Cells

    Krish, Jan 11, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,751
    Krish
    Jan 11, 2006
  2. Replies:
    0
    Views:
    543
  3. K B
    Replies:
    1
    Views:
    8,344
    brianguy16
    Feb 21, 2008
  4. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    326
    Joel Finkel
    Sep 1, 2003
  5. Krish

    GridView Empty Cells

    Krish, Jan 11, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    204
    Krish
    Jan 11, 2006
Loading...

Share This Page