Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
grid view serial number binding, Plz Any one Help me Sir i searching gridview data that time not binding in prepare way for example


This is before searching:

-----------------------
Si.no EmployeeName
-----------------------
1. Satheesh
2. Kumar
3. Sundar

now enter textbox ="S" that print

-----------------------
Si.no EmployeeName
-----------------------
1. Satheesh
3. Sundar
Posted
Updated 28-May-12 18:48pm
v3
Comments
Prasad_Kulkarni 29-May-12 0:28am    
Question is not clear..please elaborate..
Prosan 29-May-12 0:58am    
do you want search result as per you display.
1.satheesh
3.sundar

or as you want
1.satheesh
2.sundar

XML
<asp:TemplateField HeaderText="Number">
                    <ItemTemplate>
                      <%# Container.DisplayIndex+1 %>
                    </ItemTemplate>
 </asp:TemplateField>


For more details
Please click http://forums.asp.net/p/1194565/2061319.aspx[^]
 
Share this answer
 
Hi,

Use this,

XML
<ItemTemplate>
     <asp:Label ID="lblSN" runat="server" Text='<%#Container.ItemIndex+1%>'/>
</ItemTemplate>


-AK
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900