Click here to Skip to main content
15,885,065 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi am using windows forms in asp.net using c# language..

this is my code to display grid but i want to show total sum for Purchase ,sales and Profit column
private void ExpressMoney_Load(object sender, EventArgs e)
       {
           btnDelete.Enabled = false;
           btnUpdate.Enabled = false;

           con.Open();
           da = new SqlDataAdapter("select * from tblExpressMoney where emDelStatus='0'", con);
           SqlCommandBuilder builder = new SqlCommandBuilder(da);
           ds = new DataSet();
           da.Fill(ds, "tblExpressMoney");

           dataGridView1.DataSource = ds.Tables["tblExpressMoney"];

           dataGridView1.Columns["emID"].HeaderText = "ID";
           dataGridView1.Columns["emNameOfCustomer"].HeaderText = "Name";
           dataGridView1.Columns["emCustomerNo"].HeaderText = "Mobile";
           dataGridView1.Columns["emTransactionNo"].HeaderText = "Transaction No";
           dataGridView1.Columns["emAmtOfTransaction"].HeaderText = "Purchase";
           dataGridView1.Columns["emTransfererAmtPaid"].HeaderText = "Sale";
           dataGridView1.Columns["emAmountOfProfit"].HeaderText = "Profit";
           dataGridView1.Columns["emDate"].HeaderText = "Date";
       }

please suggest me how to display footer in grid and how to display total sum?
for example
File->New->Project->VisualC#->Windows Forms Application
thanks
Posted
Updated 1-Jul-12 3:21am
v5
Comments
[no name] 1-Jul-12 9:28am    
So what exactly was wrong with the answer that you already got for this question? Why are you reposting this?
ythisbug 1-Jul-12 11:21am    
that answer for web apllication
[no name] 1-Jul-12 14:13pm    
Perhaps you can explain to me how http://support.microsoft.com/kb/836672 relates to a web application?

1 solution

 
Share this answer
 
v3
Comments
ythisbug 1-Jul-12 7:45am    
thanks for ur effort .am doing project in asp.net as winform application
for example
File->New->Project->VisualC#->Windows Forms Application
DamithSL 1-Jul-12 8:02am    
Oh, then why you tag your question as ASP.NET!!
Sandeep Mewara 1-Jul-12 8:59am    
He does that as he is under the assumption that the way he is creating Winforms app is embedding Winforms in ASP.NET.

I have told him earlier too that there is nothing like Winforms in ASP.nET and the way he is creating the project, it is just Winforms and nothing else.
ythisbug 1-Jul-12 9:21am    
actually i din know. tat was in asp.net so i tagged as asp.net

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900