c# - Hide a gridView row in asp.net -


i creating gridview allows adding new rows adding controls necessary insert footertemplate, when objectdatasource has no records, add dummy row footertemplate displayed when there data.

how can hide dummy row? have tried setting e.row.visible = false on rowdatabound row still visible.

you handle gridview's databound event , hide dummy row. (don't forget assign event property in aspx code):

protected void gridview1_databound(object sender, eventargs e)     {         if (gridview1.rows.count == 1)             gridview1.rows[0].visible = false;     } 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -