Akhter HUssain

Akhter HUssain

  • 720
  • 1.3k
  • 102.1k

Gridview selected index changed

Jul 26 2019 1:12 AM
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 ....
 
 
  1. protected void GVCon_SelectedIndexChanged(object sender, EventArgs e)  
  2.  {  
  3.      cno.Text = GVCon.SelectedRow.Cells[1].Text;  
  4.      txtcontainer.Text = GVCon.SelectedRow.Cells[2].Text;  
  5.      txtWeight.Text = GVCon.SelectedRow.Cells[3].Text;  
  6.      txtbaletotal.Text = GVCon.SelectedRow.Cells[5].Text;  
  7.      //string SesnId = dm.GetData("select Cat_ID from dbo.ConCatagory where Cat_Name='" + GVCon.SelectedRow.Cells[6].Text.Trim() + "'").Rows[0][0].ToString();  
  8.      //DDLCAT.SelectedValue = SesnId;  
  9.   
  10.      DDLCAT.SelectedItem.Text = GVCon.SelectedRow.Cells[6].Text;  
 
DDLCat.selecteditem.text = GVcon.selectedRow.cells[6].Text;

here is screen shot... Goodwill getting double display ....

 
 
 

Answers (14)