Use of the gridview:
1. Unable to bind control records. When the gridview binds the dataset, if the dataset is empty. The gridview does not display the table header. It is very depressing ......
2. The time format of the binding column seems to be supported by an error.
For example, I have a time field datetime = "10:01:00"
When my gridview uses a bound column, the format cannot be set.
<Asp: boundfield datafield = "datetime" dataformatstring = "{0: hh: mm}"/>
In this way, the column still displays: 10:01:00
If I use the template column, it is successful.
<Asp: templatefield>
<Itemtemplate>
<Asp: Label id = "label1" runat = "server" text = '<% # BIND ("datetime", "{0: hh: mm }") %> '> </ASP: Label>
</Itemtemplate>
</ASP: templatefield>
In this way, in the column, it displays: 10: 01
The usage of bind and the use of dataformatstring of the gridview are as follows.
Change datafromatstring to dataformatstring = "{0: yyyy-mm-dd} to bind the display time.