Hi
I am trying to update the SharePoint List through grid view, This is the code I am using to update the list items.
item = SelectedList.Items.Add();
DropDownList ddlEventTypes = (DropDownList)Gridview1.Rows[i].Cells[1].FindControl("ddlEvents");
DateTimeControl dtStartDate = (DateTimeControl)Gridview1.Rows[i].Cells[2].FindControl("StartDate");
DateTimeControl dtEndDate = (DateTimeControl)Gridview1.Rows[i].Cells[3].FindControl("EndDate");
item["Name"] = usrValue;
item["Event Type"] = ddlEventTypes.SelectedItem.Text;
item["Start Time"] = dtStartDate.SelectedDate;
item["End Time"] = dtEndDate.SelectedDate;
item.Update();
and in my GridView EventType is a Drop down(Choice),
I am getting exception on item["Event Type"] = ddlEventTypes.SelectedItem.Text; as invalide input string type, could you please help me to update it?
thanks
Azra
With Thanks and Regards, Azra