Okay so I feel stupid for asking this and I feel like i am overlooking something, but how do retrieve the value of a datagridview cell as an int. I have used this code to change the column to type int
dataGridView1.Columns.CellTemplate.ValueType = typeof(int);
I haven't really had a chance to test this line of code above, but I beleive this will work (this data grid view contains 3 colums for intgredients the first is the count of how much the item is needed, the second column is the type of measurement suc as lbs or oz, and the third column is the name of the ingredient)
So how do I read that first columns value as an int? (I am storing it in an object array as a type int). I mean I could probably do some annoying and wasteful code to convert it from a string to and int but I feel like their is something better to do it.
I mean I know this is how to read a string
But how do I read as an int
(oh also if anyone knows a way or a web link to do suggestive typing. By this I mean like excel does where if you start typing a simialr word it gives you an option to have it filled in well for me I want to do it on the second and third column above (think about making a menu with drag and drop and a shopping list is compiled by adding up simialer names))
Edited 6 Years Ago by JOSheaIV: n/a