Nandini
Nandini

Reputation: 393

How to add data in two records in a Gridview control in Asp.net

I have a Gridview control in asp.net in which there is column called Amount.i need to add 2 particular amounts.how can i do this?

I need to edit the Gridview control according to my needs.After editing,i need to add these amounts. I have another column called Ratecode in which the values are R1,R2,R3.

Again, i have four records in which the Ratecode is R1 for the first 2 records and R3 for the next two records.i need to add the amount for the records having R1 only and those having R3 only.

How can i do this?

Upvotes: 0

Views: 126

Answers (1)

Albert
Albert

Reputation: 1025

Assuming your GridView is data bound you can add one calculated column in your DataTable that is the sum of your amounts.

Upvotes: 1

Related Questions