1
Reply

combobox column type in datagridview depending on get result

Durga Velusamy

Durga Velusamy

8 years ago
338
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 

Answers (1)