Home DotNet Gridview item template
09.09.2010
Main Menu
Programming
.NET Controls
Operating System
Databases
Articles
Add to: Digg Add to: Del.icoi.us Add to: Reddit Add to: StumbleUpon Add to: Slashdot Add to: Yahoo Add to: Technorati Add to: Google
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.

Example:

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



Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."