combobox column type in datagridview depending on get result
datagridview table
empid name attendstatus <-attendstatus is a combobox column type combobox list contains Present,Absent
101 abc Present
when saving its fine
string status=datagridview.Rows[i].Cell[2];
if(status=="Present")
{
string attendstatus="P";
}
when retrieving
string status1=dr.getvalue(0).tostring;
if(status=="P")
{
datagridview.Rows[i].Cell[2]= here i need select one of the value from combobox list
as Present
}