Click here to Skip to main content
14,930,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
Take Inputs Number of rows R  and columns C  and Create Dynamic Table (R+1)X(C+1) with a textbox in each cell (One Extra row and column for total) in Asp.net




C#
sno	        1	2	3	Total Row Wise
1	        1	2	0	    3
2	        1	0	0	    1
3	        0	0	0	    0
TotalColumn 2	2	0	    4
Posted
Updated 15-Dec-15 18:56pm
v4

1 solution

You could have googled "summary in ASP.NET GridView and get all of these...
Final result of gridview is html table element

GridView Summary[^]

GridView Examples[^]

GridView Summary Info in Footer Row[^]

GridView column computed on the fly[^]

In general: use footer row to show summary of the rows...you should probably use your datasource to calculate the values and simply bind them instead of calculating in the grid.

For the column, add new column - again, if possible, calculate on the server. If you have to calculate based on client side data then you have to do some javascript calculations.
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900