in this situation how to do the conversion
private void SetPaymentItemValueByRow(long? itemValueId, bool isChecked, double constantSettlemantAmount,double minValue, double maxvalue)
{
foreach (DataGridViewRow row in dgvConfiguration.Rows)
{
long itemValueIdRow = (long)row.Cells["ItemValueId"].Value;
if (itemValueIdRow == itemValueId)
{
DataGridViewCheckBoxCell allowEnable = (DataGridViewCheckBoxCell)row.Cells["IsEnable"];
DataGridViewCheckBoxCell txtconstantSettlementAmount = (DataGridViewCheckBoxCell)row.Cells["txtConstantSettlementAmount"];
DataGridViewCheckBoxCell txtminValue = (DataGridViewCheckBoxCell)row.Cells["txtMinValue"];
DataGridViewCheckBoxCell txtmaxValue = (DataGridViewCheckBoxCell)row.Cells["txtMaxValue"];
...
Go to the complete details ...