When i am selecting row in gridview in one cell value is (Leather Pants / Skirts) then error is coming There is no row at position 0.
I am populating Dropdownlist value using below code.
protected void GVPrd_SelectedIndexChanged(object sender, EventArgs e)
{
string SesnId2 = dm.GetData("select Codeitem from dbo.ItemMasterFile where TID='1' and delid is null and I_status='Open' and Descriptionitem=replace(REPLACE('" + GVPrd.SelectedRow.Cells[2].Text.Trim() + "','amp;',''),''','''')").Rows[0][0].ToString();
ddpitem.SelectedValue = SesnId2;
}