显示不同类型的网格视图 [英] Displaying different types of grid view
问题描述
任何人都可以共享显示不同类型的网格视图.
以下示例显示了在不同视图中显示网格视图的一种类型.
例如:带有ID,名称,年龄的表格
将在page_load的网格视图中显示,包括复选框,下拉列表和命令按钮.
输出应类似于以下命令
第一个字段为复选框
id =标签字段
然后name =下拉列表
然后age = label
然后第五个字段将是按钮
如果我选中了任何行,然后在下拉列表中选择名称,然后单击按钮,则该选定的行将显示在新的网格视图中.
Can any one share Displaying different types of grid view.
Following example showing one of the types of displaying grid view in different views.
For ex: a table with id, name, age
will show in page_load in a grid view with including of check box, drop down list, command button.
output should be like below order
first field will be check box
the id = label field
then name= drop down list
then age=label
then fifth field will be button
If i checked any row then selecting name in drop down list, after that i will be clicking button, then that selected row will display in fresh grid view.
推荐答案
您必须使用ItemTemplate,仅此而已.检查这篇文章
CodeProject常见问题系列1:ASP.NET GridView [ ^ ]
编辑
使用TemplateFields在GridView控件(C#)中 [
You have to use ItemTemplate, that''s all. Check this article
CodeProject Frequently Asked Questions Series 1: The ASP.NET GridView[^]
EDIT
Using TemplateFields in the GridView Control (C#)[^]
使用模板列".
在网上阅读更多内容.
Use "Template Column".
Read it about more on the net.
这篇关于显示不同类型的网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!