private Dictionary <string, string> GetAttributes() { var dictionary = new Dictionary <string, string>(); for (var index = 0; index < dgAttributeMap.Rows.Count - 1; index++) { var row = dgAttributeMap.Rows[index]; var id = new AttributeId(); if (Enum.TryParse(row.Cells[0].Value.ToString(), out id)) { var description = id.GetDescription(); dictionary.Add(description, row.Cells[1].Value.ToString()); } } return(dictionary); }