网格视图列 [英] gridviewcolumn
本文介绍了网格视图列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我单击特定列时,我要检索值并在文本框中显示值.
When I click on a particular column I want to retrieve the values and display the values in textboxes.
<asp:GridView ID="GridView1" runat="server"
onselectedindexchanged="GridView1_SelectedIndexChanged"
onselectedindexchanging="GridView1_SelectedIndexChanging"
ondatabound="GridView1_DataBound"
onpageindexchanged="GridView1_PageIndexChanged"
onrowcommand="GridView1_RowCommand" onrowediting="GridView1_RowEditing">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="l1" runat="server" Text='<%#Eval("ypid") %>' OnClick="l1_click"></asp:LinkButton>
</ItemTemplate>
<ItemTemplate>
<asp:Button ID="b1" runat="server" Text='<%#Eval("ypid") %>' OnClick="B1_click" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
推荐答案
一种方法是在GridView中添加''Select'' CommandField
列.
我正在提供一个Google搜索链接.有许多链接显示了如何执行此操作. ^ ]
One of the ways would be by adding a''Select'' CommandField
column to the GridView.
I am providing a Google search link. There are many links which shows how to do this. Here[^]
这篇关于网格视图列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文