如何在GridView中复制最后一行 [英] how to copy last line in gridview

查看:79
本文介绍了如何在GridView中复制最后一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个gridview,其中有多列.我想保存多列并复制由我们编辑的那一行.我的问题是如何在footer中的行上方复制.footer中的最后一行应为空白line.and由用户修改的保存... plz给出建议并提供一些代码..
谢谢您

I have a gridview in that there are multiple columns.I want to save that multi columns and copy that line which are edited by us.my question is that how to copy above line in footer.last line in footer should be blank line.and save which is modified by user...plz give the suggestion and provide some code..
Thanks you

推荐答案

我会给您一个建议,而不是代码.您不复制网格中的行.您将控件中的值分配给绑定到网格的数据源.例如,如果页脚包含允许用户输入值的空控件,则当单击按钮时,或者其他某种机制导致回发时,您可以从这些字段中获取值,将新元素添加到数据源,然后重新绑定到网格.
I''ll give you a suggestion, not code. You don''t copy rows from the grid. You assign values from controls to the datasource that is bound to the grid. For example, if the footer contains empty controls to allow users to enter values, when a button is clicked, or some other mechanism causes a postback, you obtain the values from these fields, add a new element to the datasource, then re-bind it to the grid.


这篇关于如何在GridView中复制最后一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆