abdujalil  chuliev

abdujalil chuliev

  • 1.7k
  • 221
  • 23.4k

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;
    }
    }
    }
 

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (3)