I load a dataGridview using DataTable.
suppose:
public void loadGrid()
{
con.open();SqlDataAdapter da= new SqlDataAdapter ("SELECT * FROM COMMISION_TB",con);
DataTable dt = new DataTable();
da.Fill(dt);
con.close();
dataGridview.AutogeneratedColumn=false;
dataGridview1.DataSource=dt;
}// I wite this code in notepad
Like that...
| Empno | Name | Dept | Basic Salary | Commision (%) | Status |
| E123 | Priya | EC | 32500 | 2 | Paid |
| E124 | Riya | EN | 20800 | 3.5 | Paid |
| E125 | Jiya | GG | 29500 | 1.5 | Paid |
I want to display the total paid amount (basic salary+(basic salary * commission) ) in this gridview as column, that is
| Empno | Name | Dept | Basic Salary | Commision (%) | Total Amount | Status |
| E123 | Priya | EC | 32500 | 2 | 33150 | Paid |
| E124 | Riya | EN | 20800 | 3.5 | 21528 | Paid |
| E125 | Jiya | GG | 29500 | 1.5 | 29942.5 | Paid |
Kaushik DhameliyaPosted Apr 5, 2018, 5:22 AM
Prakash MondalPosted Apr 5, 2018, 11:26 PM
Rafnas T PPosted Apr 5, 2018, 10:19 AM
Kaushik DhameliyaPosted Apr 5, 2018, 6:26 AM
Sai SherlekarPosted Apr 5, 2018, 5:29 AM