简体   繁体   中英

How to add a row(dynamically) in gridview

good evening to all of you.I have a liitle problem.i have a gridview(id is gridview1) and bind that with array list objects.my gridview1 have a 15 columns.I want to add a dynamic row in my grid view because i want to show the total of amount column(this column in the gridview1) after change the ponumber column(this is column in gridview1).

like this ponumber amount 1 23

1 25

total 48

2 45

2 65

total 110

There's a few ways you could do this. You could modify the datasource to do your sub grouping. You could insert some custom data on the OnDataBound event of your GridView. Or you could use an ASP Repeater and write out your own table structure with 's and 's

Also, this guy asked a Similar Question , and got a good answer on building your own GridView dynamically

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM