abdujalil  chuliev

abdujalil chuliev

  • 1.2k
  • 400
  • 38.8k

hide empty row in gridview

Jun 15 2017 4:36 AM
I want to hide empty row in one particular column. I tried to but negative. Below is my code:
 
  1. protected void gvDb_DataBound(object sender, EventArgs e)
    {
    foreach (GridViewRow rw in gvDb.Rows)
    {
    if ((string.IsNullOrEmpty(rw.Cells[1].Text) | (rw.Cells[1].Text == "")))
    {
    rw.Visible = false;
    }
    }
    }
 

Answers (3)