Luv L

Luv L

  • 1.6k
  • 84
  • 5.6k

Datagidview column sum with Multiplication with specific column cell

Sep 24 2024 11:32 AM

Hi,

Please help below given 

i want to multiply with coloumn1 value with column3(X) value Dynamically. c# Winform  like below.

i have 3 columns 

Column1 = C1

column2 = C2

column3 = X

Dynamically i want to c1 cell value multiplied with c3(x) Value.

Datagridview1
     
C1 C2 X
10 A  
10 B 3
1 A  
1 B 15
2 C  1
6 D 1
Textbox1.text  = total 98

Also Sum value of enter Charectors (a,b,c,d,e LIKE)

TOTAL -A = Textbox2.Text = 45

             B= Textbox3.Text = 45

             C= Textbox4.Text = 2

             D= Textbox5.Text = 6

Total should be A+B+C+D=  98.

Explanation :

(10+10) * 3 = 20*3 = 60

(1+1)*15 = 2*15 = 30

2*1 = 2

6*1 = 6

Total should be 98.

Hope Understand what i need.Thanks in Advance.

Varta


Answers (1)