0

i am trying to add values in two coloums of data grid view. Howeaver the result is values are concatenated instead of adding. i.e 10+25 result is 1025 and not 35.

DgvLedger.Rows.Item(GRNO).Cells(6).Value = DgvLedger.Rows.Item(PRNO).Cells(6).Value + DgvLedger.Rows.Item(GRNO).Cells(3).Value

howeaver multiplaying two coloums value result is correct.

2
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by PM312
0

try this

DgvLedger.Rows.Item(GRNO).Cells(6).Value = Val(DgvLedger.Rows.Item(PRNO).Cells(6).Value + DgvLedger.Rows.Item(GRNO).Cells(3).Value)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.