I replaced the variables with values and the code work and sections of this work independently. Here is the section of code in question and it is the iCalcExample calculation I'm trying to correct.
if (Convert.ToInt32(args.ProposedValue) > 0) {
// pending CommAmt_c
string sCommAmt_c = (string) edvOrderDtl.dataView[edvOrderDtl.Row]["CommAmt_c"].ToString();
int iCommAmt_c = Convert.ToInt32(edvOrderDtl.dataView[edvOrderDtl.Row]["CommAmt_c"]);
// OrderDtl.DocExtPriceDtl
string sExtPrice = (string) edvOrderDtl.dataView[edvOrderDtl.Row]["DocExtPriceDtl"].ToString();
int iExtPrice = Convert.ToInt32(edvOrderDtl.dataView[edvOrderDtl.Row]["DocExtPriceDtl"]);
// OrderDtl.DocDiscount
string sDocDisc = (string) edvOrderDtl.dataView[edvOrderDtl.Row]["DocDiscount"].ToString();
int iDocDisc = Convert.ToInt32(edvOrderDtl.dataView[edvOrderDtl.Row]["DocDiscount"]);
// Calculated value
int iCalcExample = Convert.ToInt32((iCommAmt_c) / (iExtPrice - iDocDisc)) * 100;
// string sCalcExample = iCalcExample.ToString();
// string sCalcExample = String.Format("{0:F?}", iCalcExample, 2);
int numberOfDecimalPlaces = 2;
string formatString = String.Concat("{0:F", numberOfDecimalPlaces, "}");
string sCalcExample = string.Format(formatString, iCalcExample);
// end variables
MessageBox.Show("ExtPrice: " + sExtPrice);
MessageBox.Show("DocDisc: " + sDocDisc);
MessageBox.Show("Calc Example: " + sCalcExample);
}