You can proceed as follows :
private void datagrid_CellClick(System.Object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
{
string val = null;
if (e.RowIndex > -1 & e.ColumnIndex > -1) {
val = this.datagrid.Rows(e.RowIndex).Cells(2).Value;
if (val == "ram") {
this.checkList.Items(1).@checked = true;
}
}
}
comment for any further queries.