How to caluclate the sum in datagridview
-
Hello.... In my application i am having a datagriview with columns Column1 column2 column3 Accountname Debit Credit ----------------------------------- total debit total credit The total debit and total credit are two textboxes outside the gridview. And my gridview is unbound. Plz help me how i can caluclate all the values in the debit column and get the result in the toatldebit textbox and similarly credit into total credit textbox. Plz someone post me the code... It's helpful Thanks in advance... :)
-
Hello.... In my application i am having a datagriview with columns Column1 column2 column3 Accountname Debit Credit ----------------------------------- total debit total credit The total debit and total credit are two textboxes outside the gridview. And my gridview is unbound. Plz help me how i can caluclate all the values in the debit column and get the result in the toatldebit textbox and similarly credit into total credit textbox. Plz someone post me the code... It's helpful Thanks in advance... :)
Anjani Poornima wrote:
Plz someone post me the code...
It is unlikely that you are going to get the entire code here. Have you tried anything? You can handle the CellLeave event of the gridview and set the value in the textbox. Check the column index of the cell and if it is debit/credit and then set the text of textboxes below.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus