3
Reply

hide empty row in gridview

abdujalil  chuliev

abdujalil chuliev

Jun 15 2017 4:36 AM
224
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)