Hi friends,
i have a dropdown control inside Gridview control, on selection of values from the dropdown
a message box should Pop-Up showing the related message.
how can it be acheivable
Pl reply.
aamir
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Aamir KhanPosted Jul 5, 2012, 2:22 PM
V S N Raju KanumuriPosted Jul 5, 2012, 1:40 PM
protected void DropDownList1_SelectedIndexChanged(System.Object sender, System.EventArgs e) {
string value=
(DropDownList)GridView1.Rows(GridView1.SelectedIndex).Cells(0).FindControl("DropDownList1")).SelectedValue;
}Respnse.Write("");
may be this is help to u
Aamir KhanPosted Jul 5, 2012, 1:18 PM
Hemant KumarPosted Jul 5, 2012, 8:32 AM
Try like this
<htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title>title><scripttype="text/javascript"src="http://code.jquery.com/jquery-1.4.1.js">script><scripttype="text/javascript">$(document).ready(function () {$('#ddl').change(function () {alert($('#ddl :selected').text());});});script>head><body><formid="form1"runat="server"><div><asp:ScriptManagerrunat="server"ID="sm1"/><asp:UpdatePanelrunat="server"ID="up1"><ContentTemplate><asp:DropDownListrunat="server"ID="ddl"><asp:ListItemText="text1"/><asp:ListItemText="text2"/>asp:DropDownList>ContentTemplate>asp:UpdatePanel>div>form>body>html>