Programming for Everybody: Auto Generate Row Number in GridView asp.net

Auto Generate Row Number in GridView asp.net

Solution

 <asp:TemplateField HeaderText="No.">
                        <ItemTemplate>
                            <%# Container.DataItemIndex + 1 %>
                        </ItemTemplate>
                        <ItemStyle Width="25px" />
                    </asp:TemplateField>

No comments:

Post a Comment