在asp.net中的gridview中动态添加多行 [英] Dynamically add multiple rows in gridview in asp.net

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

问题描述

我有一个有3列的gridview。在3列中,我有两个下拉控件和一个测试盒控件。

默认情况下,在页面加载时,将显示一行,其中包含2个下拉菜单和一个文本框。我在网格视图和文本框上方有一个按钮。单击该按钮,行数将在gridview中生成在文本框中输入的值。

如何使用asp.net或jquery执行此操作。请帮帮我。

解决方案

试试

在Gridview中添加动态行与asp.net中的下拉列表 [ ^ 添加动态行-b
动态添加和删除ASP.NET GridView中的行 [ ^ ]

在ASP.Net GridView控件中添加动态行使用TextBoxes [ ^ ]


您应该使用按钮的 xxx_Click 事件添加新行在你的数据库中,如果你的GridView正确,你应该显示新的数据!



你可以在我的下一篇文章中找到高级ASPX GridView分页和数据实体 [ ^ ]关于在ASP.NET中使用GridView的详细代码示例。

I have one gridview with 3 columns. In 3 columns I have two drop down controls and one test box control.
On page load by default one row will be display with 2 drop down and one text box. I have one button above grid view and text box. On click of that button, no.of rows will generate in gridview which value entered in the text box.
how can I do this using asp.net or jquery. Please help me.

解决方案

Try
Adding Dynamic Rows in Gridview with dropdownlists in asp.net[^]
Dynamically adding and deleting rows from ASP.NET GridView[^]
Adding Dynamic Rows in ASP.Net GridView Control with TextBoxes [^]


You should use the xxx_Click event of your button to add new row in your database, and if you are bounded correctly your GridView the new data should be shown!

You can find in my next article Advanced ASPX GridView Pagination and Data Entities[^] detailed code example about using GridView in ASP.NET.


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

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