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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -