简体   繁体   中英

how to count dynamically added table rows

My table has already 5 rows...after pressing addrow, rows are added dynamically to another table... I need to save the data of all the rows(5+newly added) in the database...

How can I achieve this?

您创建一个新变量来存储当前表的数量,然后在创建新表时以相同的操作将其增加...应该不太难;)

使用DataAdapter + DataTable.AcceptChanges()

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