且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

创建一个网格视图,其中包含2个文本框和2个可从数据库中检索数据的下拉列表

更新时间:2023-11-23 10:00:46

看看这些文章,了解它是如何工作的:

ASP.NET 2.0中的可编辑GridView [ ^ ]

将DropDownList添加到可编辑的DataGrid [ ^ ]

访问GridView内的DropDownList [ ^ ]

GridView内部的DropDownList(方法1) [ ^ ]

将DropDownList嵌套到ASP.NET 2.0中的Gridview(C#) [ ^ ]



下次,请使用谷歌(至少CP搜索) - 它很有意思。

请查看此网址



http://www.highoncoding.com/Articles/169_DropDownList_Inside_GridView__Method_1_.aspx [ ^ ]

http://forums.asp.net/t/1683979.aspx/1 [ ^ ]

http://go4answers.webhost4life.com/Example/dynamically-textbox-dropdownlist-135222.aspx [ ^ ]


引用:

回复紧急..

对不起,这对我们来说并不紧急。



Quote:

Please..anybody Help me Out

有关提示,请在itemtemplate中添加dropdownlist,并使用gridview的rowdatabound事件在运行时绑定它。 />


帮助我们你。发布您目前为止所尝试的代码。


Can we put the Dropdown list in Grid view and retrieve the items directly from the database?
reply urgent..Please..anybody Help me Out

Have a look at these articles to understand how it works:
Editable GridView in ASP.NET 2.0[^]
Adding a DropDownList to an Editable DataGrid[^]
Accessing a DropDownList inside a GridView[^]
DropDownList Inside GridView (Method 1) [^]
Nesting the DropDownList to Gridview in ASP.NET 2.0(C#)[^]

Next time, please use Google (atleast CP search) - it works wonder.


Please check this url

http://www.highoncoding.com/Articles/169_DropDownList_Inside_GridView__Method_1_.aspx[^]
http://forums.asp.net/t/1683979.aspx/1[^]
http://go4answers.webhost4life.com/Example/dynamically-textbox-dropdownlist-135222.aspx[^]


Quote:

reply urgent..

Sorry, it''s not urgent for us.

Quote:

Please..anybody Help me Out

For a hint, add dropdownlist in the itemtemplate and use gridview''s rowdatabound event to bind it at runtime.

Help us help you. Post your code what you have tried so far.