Unable to cast object of type 'System.Data.DataRowView' to type 'System.IConvertible'


در صورت استفاده از کدهای به شکل زیر این پیغام خطا صورت می گیرد.

 Int64 tempMainProductId = Convert.ToInt64(coboxGoodsGroup.SelectedValue);

راه حل:
Int64 tempMainProductId = Convert.ToInt64(coboxGoodsGroup.SelectedValue.ToString());