如何在动态创建的Gridview中添加动态行 [英] how to add dynamic row in a dynamically Created Gridview

查看:104
本文介绍了如何在动态创建的Gridview中添加动态行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在创建Gridview,它将从对应于该列的数据中动态获取列数和行数.gridView之外有一个按钮.单击该按钮后,我应该能够以可编辑的方式在gridView的顶部添加一行,以便我可以输入所需的值并将其保存到后面的代码中的数据表中.
帮助需要!
感谢和问候
parag.



I am creating Gridview which will dynamcially take number of columns and row from data corresponding to that column.I have one button outside the gridView . On the click of that button i should be able to add one row at the top of the gridView in a editable mode, so that i can enter the the value which i want and save that to datatable in Code behind.

Help need !
thanks and regards
parag.

推荐答案

GridView绑定到某种类型的数据源.如果要将新行添加到网格,请在数据源中添加新项.如果要空白行,则使用页眉或页脚模板放置一个.
A GridView is bound to a datasource of some type. If you want to add a new row to the grid then add a new item to your datasource. If you want blank rows then use either the header or footer templates to place one.


这篇关于如何在动态创建的Gridview中添加动态行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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