Showing Datagrid even if no data (.net 1.1)
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
I have a Datagrid that allows the user to add a new record in the footer, but if there is no data the entire datagrid is hidden. Is there any way to force it to show even if there is no data? JGA
How about including a Label above the DataGrid like this:
<asp:Label id="lblNoRecords" runat="server" Text="No records to display." Visible="false" />
Then in your code that binds the datagrid to its source, inspect the dataset (datatable?) to see if it contains any rows; if not, turn the .Visible property of your Label to
true
.