vijay kumar
how to show the row value in div inside gridview div itemtemplate column
By vijay kumar in ASP.NET on May 19 2010
  • Biprojit Roy Choudhury
    May, 2010 31


    Just put these template field inside a grid view.


    <asp:TemplateField>
    <ItemTemplate>
    <div id = "divItemTemplate" runat = "server">
    <table>
    <tr>
    <td>
    <asp:Label ID="lblRowNo" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
    </td>
    </tr>
    </table>
    </div>
    </ItemTemplate>
    <HeaderStyle/>
    <ItemStyle/>
    </asp:TemplateField>

    Note: The Line Text='<%# Container.DataItemIndex + 1 %> ' will give you the count of rows in Gridview.

    • 0
  • kiran adhLAKHA
    May, 2010 20

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"

    Height="234px" ShowFooter="True" Width="603px" CellPadding="4"

    ForeColor="#333333" GridLines="None"

    onselectedindexchanged="GridView1_SelectedIndexChanged">

    <RowStyle BackColor="#E3EAEB" />

    <ItemTemplate>

    <asp:Button ID="Button1" runat="server" CausesValidation="false" CommandName=""

    Text="Clear" />

    </ItemTemplate>

     

     

     

     

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS