如何使用asp.net在gridview中添加下拉列表
问题描述:
在gridview中我希望输出如下
教师姓名1 2 3
Ram Dropdownlist1 Dropdownlist2 Dropdownlist3
Suresh Dropdownlist4 Dropdownlist5 Dropdownlist6
i想要在gridview中为每一行添加Dropdownlist。为此我该如何在asp.net中使用C#。
In gridview i want the output as follows
Faculty Name 1 2 3
Ram Dropdownlist1 Dropdownlist2 Dropdownlist3
Suresh Dropdownlist4 Dropdownlist5 Dropdownlist6
i want to add the Dropdownlist in gridview for each row. for that how can i do in asp.net using C#.
答
查看这些文章:
动态添加填充到GridView的下拉列表 [ ^ ]
如何在ASP中使用DropDownList控件到GridView。 NET使用c# [ ^ ]
如何在ASP.Net中的GridView中填充DropDownList [ ^ ]
Check these articles:
Add populated dropdownlist to GridView dynamically[^]
How to use DropDownList control to GridView in ASP.NET using c#[^]
How to populate DropDownList in GridView in ASP.Net[^]
Refer - 从ASP.NET GridView动态添加和删除行 [ ^ ]
Refer-Dynamically adding and deleting rows from ASP.NET GridView[^]
你必须在GridView中使用ItemTemplates来使用它。
http://forums.asp.net/t/ 1273097.aspx [ ^ ]
以上链接将为您提供一个整体示例。
Hi,
You have to use ItemTemplates in GridView to use that.
http://forums.asp.net/t/1273097.aspx[^]
The above link will give you an overall example.