Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
protected void dropdownlist1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (dropdownlist1.SelectedItem.ToString() == "Poor")
        {
            SetDropdowndetails("dropdownlist1", 1);
        }
        else
        {
             Selectednotpoor();
        }
    }

    private void SetDropdowndetails(string Dropdownname, Int32 Dropdownid)
    {
            SelectedDropdown = Dropdownname.ToString();
            hfnegativefeedback.Value = Dropdownid.ToString();
            Negativepnlpopup();
    }

    
    private void Negativepnlpopup()
    {
        try
        {
           
            textbox1.Text = "";
            DataTable dt = new DataTable();
            dt = (DataTable)ViewState["Remarks"];
            if (ViewState["Remarks"] != null)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (hfnegativefeedback.Value == dt.Rows[i][0].ToString())
                    {
                        textbox1.Text = dt.Rows[i][1].ToString();
                    }
                }
            }

            ModalPopupExtender1.TargetControlID = SelectedDropdown.ToString();
            textbox1.Focus();
            ModalPopupExtender1.Show();
            Pnlnegativefeedback.Visible = true;
        }
        catch (Exception e2)
        {
 
        }
    }



when i select the poor from the dropdownlist panelpopup is displaying.
the panelpopup as follows.

NegativeFeedback

textbox1
ok(Button) cancel(Button)

in the textbox1 type the reason for poor and click the ok button. then selected dropdown and textbox1 reason as has been shown in gridview.

if suppose user want to click the Excellent in drodpdownlist, the poor reason has been removed in the gridview for that how can i do using csharp.


Regards,
Narasiman P
Posted
Updated 19-Feb-14 6:14am
v3

 
Share this answer
 
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900