| Gridview item template |
|
GridView is a rich databind control it is use to display values of a data source in the table, or business object and etc. If you find that the gridview does not display the way you want it to display you can customise your own field and have it display the way you want it to. You can do that by using the TemplateField column field type. <asp:GridView ID="gvResult" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:HyperLink ID="lnkTitle" NavigateUrl="<% #Eval('URL') %>" runat="server">Title</asp:HyperLink><br /> <asp:Label ID="lblDescription" runat="server"></asp:Label> <br /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
|