Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

how to find total price in datagridview

$
0
0

Hi

I am new in c#.

Please can you help to find the total price in  computed column'Total'  from the given code using cellendedit

 // 
            this.dataGridViewInvoice.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridViewInvoice.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.InvItem,
            this.InvQty,
            this.InvRate,
            this.InvTotal});
          
            this.dataGridViewInvoice.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewInvoice_CellEndEdit);

// 
            // InvItem
            // 
            this.InvItem.HeaderText = "Item";
            this.InvItem.Name = "InvItem";
            this.InvItem.Width = 400;
            // 
            // InvQty
            // 
            this.InvQty.HeaderText = "Qty";
            this.InvQty.Name = "InvQty";
            // 
            // InvRate
            // 
            this.InvRate.HeaderText = "Rate";
            this.InvRate.Name = "InvRate";
            // 
            // InvTotal
            // 
            this.InvTotal.HeaderText = "Total";
            this.InvTotal.Name = "InvTotal";
            this.InvTotal.ReadOnly = true;

With many thanks 

Pol


polachan


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>