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? -

visual studio - Deleting lines of code in a text editor -

What's the encoding type of Android 2.2 push message? -