网格视图序列号绑定 [英] grid view serial number binding

查看:78
本文介绍了网格视图序列号绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网格视图序列号绑定,请帮助我,先生,我以准备方式搜索当时未绑定的gridview数据


这是在搜索之前:

-----------------------
Si.no EmployeeName
-----------------------
1. Satheesh
2. Kumar
3.桑达尔

现在输入打印
的文本框="S"
-----------------------
Si.no EmployeeName
-----------------------
1. Satheesh
3. Sundar

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

推荐答案

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



有关更多详细信息,请参见
请单击 http://forums.asp.net/p/1194565/2061319.aspx [ ^ ]



For more details
Please click http://forums.asp.net/p/1194565/2061319.aspx[^]




用这个

Hi,

Use this,

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



-AK



-AK


这篇关于网格视图序列号绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆