在JavaScript中将新行插入到gridview中 [英] Insert a new row into gridview in javascript

查看:57
本文介绍了在JavaScript中将新行插入到gridview中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用javascript在gridview中插入新行.
这些值仅显示在gridview itemtemplate中,其数据存储在数据库中.

I need to insert a new row into gridview using javascript.
The values are just showed into gridview itemtemplate and its datas are stored into database.

推荐答案

您可以使用JQuery ^ ]制作现有元素(例如表格行)的副本,并将其插入表格中.但是,如果要从数据源添加新行,则应将网格与回发重新绑定.
You can use JQuery clone[^] to make a copy of existing elements, such as a table row, and insert it into the table. However, if you want to add a new row from your datasource you should rebind the grid with a postback.


这篇关于在JavaScript中将新行插入到gridview中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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