1

Values in ComboBox:

enter image description here I want to access values of ComboBox. I define equal for each item, for example "عالی" is equal to 100 and etc.

  • 1
    This looks like a duplicate of this question https://stackoverflow.com/questions/1390462/datagridviewcomboboxcolumn-name-value-how – Darren Blaby Jul 29 '17 at 07:10
  • show code where you define the items values. –  Jul 29 '17 at 07:47
  • string sel = GridView_Karkard.SelectedRows[0].Cells["myCombo"].Value.ToString(); switch (sel) { //case "عالی": Globals.val = 100; break; case "عالی": val = 100; break; case "خیلی خوب": val = 99; break; case "خوب": val = 98; break; case "متوسط": val = 97; break; case "ضعیف": val = 96; break; default: val = 0; break; } – Maryam Delghandi Jul 29 '17 at 08:02
  • ok, this is not a way to bind items, you have to use `datasource` –  Jul 29 '17 at 08:20
  • I hope you read this. I am sorry about what happened with your question today. I understood what you were asking, but sometimes people on SO are more interested in proving how clever and superior (they think) they are than actually helping someone else. As far as I am concerned, I give answers to try to help newbies. Please don't let the trolls here discourage you. – Jonathan Willcock Aug 12 '17 at 21:04

0 Answers0