проблемы с типами.

strizzz
Дата: 29.05.2006 11:25:19
EditCard.IDCard - int

int currentRowIndex = DataGridView1.CurrentRow.Index;
EditCard.IDCard = (int)DataGridView1[currentRowIndex, 0].Value;


выдает:

InvalidCastException was unhandled!

Specified cast is not valid.

каким тогда образом можно данные из БД присвоить переменной или свойству класса?

подскажите, плз.
winsky!
Дата: 29.05.2006 12:05:26
int.Parse or
Systme.Convert.ToInt32
winsky!
Дата: 29.05.2006 12:06:12
очепятался
System.Convert.ToInt32
strizzz
Дата: 29.05.2006 17:47:53
winsky!

благодарю.