使用asp.net在gridview中显示文本框 [英] display textbox inside gridview using asp.net
本文介绍了使用asp.net在gridview中显示文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
海,
我需要空的文本框,下拉列表以在运行时显示.在此,我想将值读取到数据库
请任何人帮助我
Hai,
i need empty textbox,dropdownlist to display at runtime.In that i want to read values to database
please anyone help me
推荐答案
您需要使用模板字段.TemplateField
对象使您可以指定包含标记和控件的模板,以自定义GridView控件中列的布局和行为.使用ItemTemplate
,可以指定GridView在列中显示数据时要使用的布局.
在这里阅读所有内容:
MSDN:在GridView控件中使用TemplateFields [ MSDN:在GridView Web服务器控件中创建自定义列 [ MSDN:TemplateField.ItemTemplate属性 [ ^ ]
You need to use template fields. ATemplateField
object enables you to specify templates that contain markup and controls to customize the layout and behavior of a column in a GridView control. Using anItemTemplate
, you can specify the layout to be used when the GridView displays data in a column.
Read all about it here:
MSDN: Using TemplateFields in the GridView Control[^]
MSDN: Creating a Custom Column in a GridView Web Server Control[^]
MSDN: TemplateField.ItemTemplate Property[^]
这篇关于使用asp.net在gridview中显示文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文