take a look to the form frmPurchaseDetails:-
You can see the ProductName column is being filled in frm_Load Event.
the very next column PurchaseRate is to be filled as per the selection of products.
before going to the task, take a look the form frmProduct where the product Name come from:-
You can see Product Name and Purchase Rate column.
I want also increment of TotalAmount column ( purchase Rate * quantity - Discount=Total Amount)
here is the form to be look like:-
So please help me on this topic

Iftikar HussainPosted Jul 25, 2013, 6:52 AM
Regards,
Iftikar
Bineesh ViswanathPosted Jul 25, 2013, 6:47 AM
The total amount is being populated in the column Quantity. I want this in the column Total Amount
but the purchaseRate still not populated.
here is the form:-
Iftikar HussainPosted Jul 25, 2013, 6:41 AM
total = (Convert.ToInt32(rate) * Convert.ToInt32(quantity)) - discount;
Regards,
Iftikar
Bineesh ViswanathPosted Jul 25, 2013, 6:34 AM
here is the current situation:-
The variable's value at the moment is:-
int total=0;
var rate=11;
Iftikar HussainPosted Jul 25, 2013, 5:48 AM
Regards,
Iftikar
Bineesh ViswanathPosted Jul 25, 2013, 5:41 AM
in this int total=0;
var rate=7;
var quantity=NULL( error) .
the error look like:-
Iftikar HussainPosted Jul 25, 2013, 4:27 AM
Regards,
Iftikar
Bineesh ViswanathPosted Jul 25, 2013, 3:45 AM
there had a problem in my project before adding your code. here is the problem.
frmpurchaseDetails:-
The problem is rows being added automatically when I select a comboBox item.
After added your code I am getting a error. here is the error:-
please fix my error.
Iftikar HussainPosted Jul 25, 2013, 2:55 AM
Try like this
this.dataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEndEdit);
}
Regards,
Iftikar