Reputation: 751
I have tried the RowCreated event and created a GridViewRow with rowType DataRow and inserted a LinkButton which works fine. I have inserted the row as a footer row with no problems.
The problem occurs when I clear all the data from the database and the grid is empty with no data. After that the gridview stops showing the row I have created and won't even open a trace on the RowCreated event. So is there any solution or reason why this occurs?
Upvotes: 0
Views: 357
Reputation: 6277
If you want a row shown when there is no data in the gridview try the EmptyDataTemplate
<EmptyDataTemplate>
Markup for row goes here
</EmptyDataTemplate>
This will show data when there is no data in the data source
Upvotes: 2