在gridview上选择Row并在文本框上显示值 [英] Select Row on gridview and display values on textboxes
本文介绍了在gridview上选择Row并在文本框上显示值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在数据网格上启用了选择
I enabled selection on my datagrid
AutoGenerateSelectButton="true"
我想要实现的是什么时候用户单击选择按钮,该行上的值将显示在文本框中。我怎么能这样做?
What I want to achieve is when user clicks the select button, the values on that row will be displayed on the textbox. how can i do this?
推荐答案
使用 GridView.RowCommand事件 [ ^ ]或GridView.SelectedIndexChanged事件 [ ^ ]
按上述事件获取值并将其分配给文本框。
示例:
< a href =http://www.codeproject.com/Tips/564619/Example-of-gridview-rowcommand-on-Button-Click>按钮上的gridview rowcommand示例 [ ^ ]
Use GridView.RowCommand Event[^] or GridView.SelectedIndexChanged Event[^]
Get the values by above event and assign it to Textbox.
Example:
Example of gridview rowcommand on Button Click [^]
这篇关于在gridview上选择Row并在文本框上显示值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文