when i selecting row from gridview and data getting loading into textbox and dropdownlist,when data get load in dropdown list value getting double to display ....
- protected void GVCon_SelectedIndexChanged(object sender, EventArgs e)
- {
- cno.Text = GVCon.SelectedRow.Cells[1].Text;
- txtcontainer.Text = GVCon.SelectedRow.Cells[2].Text;
- txtWeight.Text = GVCon.SelectedRow.Cells[3].Text;
- txtbaletotal.Text = GVCon.SelectedRow.Cells[5].Text;
- //string SesnId = dm.GetData("select Cat_ID from dbo.ConCatagory where Cat_Name='" + GVCon.SelectedRow.Cells[6].Text.Trim() + "'").Rows[0][0].ToString();
- //DDLCAT.SelectedValue = SesnId;
- DDLCAT.SelectedItem.Text = GVCon.SelectedRow.Cells[6].Text;
DDLCat.selecteditem.text = GVcon.selectedRow.cells[6].Text;
here is screen shot... Goodwill getting double display ....

Amit MohantyRank #112 · 20K reputationPosted Jul 25, 2019, 11:43 PM EDT
DDLCAT.Items.FindByText(GVCon.SelectedRow.Cells[6].Text).Selected = true;
Salman BegRank #284 · 8.8K reputationPosted Jul 25, 2019, 9:29 PM EDT
Amit MohantyRank #112 · 20K reputationPosted Jul 25, 2019, 10:23 PM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jul 25, 2019, 11:27 PM EDT
Akhter HUssainRank #1,522 · 1K reputationPosted Jul 25, 2019, 9:43 PM EDT
Amit KumarRank #459 · 5.4K reputationPosted Jul 26, 2019, 9:59 PM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jul 25, 2019, 9:27 PM EDT
Akhter HUssainRank #1,522 · 1K reputationPosted Jul 25, 2019, 9:45 PM EDT
Salman BegRank #284 · 8.8K reputationPosted Jul 25, 2019, 9:49 PM EDT
Amit MohantyRank #112 · 20K reputationPosted Jul 25, 2019, 9:56 PM EDT
Akhter HUssainRank #1,522 · 1K reputationPosted Jul 25, 2019, 10:09 PM EDT
Akhter HUssainRank #1,522 · 1K reputationPosted Jul 25, 2019, 10:10 PM EDT
Akhter HUssainRank #1,522 · 1K reputationPosted Jul 25, 2019, 10:38 PM EDT
Cannot have multiple items selected in a DropDownList.
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jul 25, 2019, 11:35 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts