访问GridView内部的DropDownList [英] Accessing a DropDownList inside a GridView
本文介绍了访问GridView内部的DropDownList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我在gridview控件中有一个列表框和dropdownlist控件.我加载lstbox和下拉列表.获取下拉列表和列表框所选值时存在问题.我尝试了许多代码,但没有获得适当的选定值.它总是带给我第一个价值.
Hi frnds,
i have a listbox and dropdownlist control inside the gridview control. I load the lstbox and dropdown. There''s a problem in getting the values of dropdown and listbox selected values. I tried many codes but its not getting the appropriate selected values. It always gets me the first value.
<asp:GridView ID="user_grid" runat="server" AllowPaging="True" PageSize="10"
AutoGenerateColumns="False"
onpageindexchanging="user_grid_PageIndexChanging"
DataKeyNames="adminfilepath" onrowupdating="user_grid_RowUpdating"
onrowdatabound="user_grid_RowDataBound">
<asp:TemplateField HeaderText="SL No.">
<%# Container.DataItemIndex + 1%>
<asp:TemplateField Visible="false">
<asp:Label ID="lblid" runat="server" Text='<%# Bind("Content_id") %>'>
<asp:TemplateField HeaderText="ManuscriptNo">
<asp:LabeL ID="lblmanuno" runat="server" Text='<%# Bind("ManuscriptNo") %>'>
<asp:TemplateField HeaderText="UserName">
<asp:Label ID="lbluser" runat="server" Text='<%# Bind("UserName") %>'>
<asp:TemplateField HeaderText="DateOfSubmission">
<asp:Label ID="lblDoS" runat="server" Text='<%# Bind("DateofSubmission") %>'>
<asp:TemplateField HeaderText="ArticleName">
<asp:Label ID="lbl_article" runat="server" Text='<%# Bind("Articlename") %>'>
<asp:TemplateField HeaderText="ArticleType">
<asp:Label ID="lbl_articletype" runat="server" Text='<%# Bind("Articletype") %>'>
<asp:TemplateField HeaderText="FileDownload">
<asp:LinkButton ID="lnkDownload" runat="server" CommandName="Download" OnClick="lnkDownload_Click">Download
<asp:TemplateField Visible="false">
<asp:Label ID="lbl_Reviewerfilepath" runat="server" Text='<%# Bind("reviewerfilepath") %>'>
<asp:TemplateField HeaderText="ReviwerList">
<asp:ListBox ID="ListBox1" runat="server" SelectionMode="Multiple" EnableViewState="False" AppendDataBoundItems="true" >
<asp:TemplateField HeaderText="Status">
<asp:DropDownList ID="drp_status" runat="server">
<asp:ListItem Text="Select Status" Value="">
<asp:ListItem Text="Accept" Value="1" >
<asp:ListItem Text="Reject" Value="2" >
<asp:TemplateField HeaderText="Update">
<asp:LinkButton ID="lnkupadte" runat="server" CommandName="Update">Update
请帮助!!!!
Plz help !!!!
推荐答案
此搜索将为您提供成千上万的搜索结果, ^ ]
This search will give you thousands of search results, see here[^]
检查这些
在Gridview内的另一列中设置下拉列表的选定值
处理下拉菜单INSIDE GRIDVIEW中的选定索引更改事件 [^ ]
http://stackoverflow.com/questions/10935114/从下拉列表中获取选定的值,更新后 [
Check these
set dropdown list''s selected value in another column inside Gridview
working with selected index change event of dropdown INSIDE GRIDVIEW[^]
http://stackoverflow.com/questions/10935114/get-selected-value-from-drop-down-inside-gridview-on-update[^]
这篇关于访问GridView内部的DropDownList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文