在GridView中添加新行 [英] Add new row in GridView

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

问题描述

我有一个带有ItemTemplate的GridView

总共有5列,全部都是TextBox模板.

在最后一列(TextBox)离开事件之后,应在GridView中添加一个空白行.

如果需要,我们可以使用javascript的"onblur"事件

有可能吗?

预先感谢.

I have a GridView with ItemTemplate

There are 5 columns in total, all are TextBox templates.

After last column''s (TextBox) leave event one blank row should be added in the GridView.

We can use javascript''s "onblur" event if it needs be

Is it possible in any way???

Thanks in advance.

推荐答案

是否有可能????
是的.

如果需要,我们可以使用javascript的"onblur"事件
要添加新行吗?

听起来好像您有一项作业,或者有人详细地告诉了您有关该作业的内容,并且您正在提出自己所听到的一切. :)

仅当您要对字段进行某种形式的验证或依赖性时才需要使用OnBlur.

看看这篇文章,了解几乎所有的网格方案:可编辑嵌套GridView(多合一) [ ^ ]
Is it possible in any way???
Yes.

We can use javascript''s "onblur" event if it needs be
For adding a new row?

Sounds like you got a homework or someone told you about it in detail and you are putting up whatever you heard of. :)

OnBlur is needed only if you are going to have some kind of validation or dependency on the fields.

Have a look at this article for almost all scenarios of grid: Editable Nested GridView (All-in-One)[^]


看看这个链接.现在,它使用按钮单击来添加新行,但请确保您可以根据需要进行更改.
http://geekswithblogs.net/AzamSharp/archive/2008/02/06/119332.aspx [ ^ ]

祝你好运!
Have a look at this link. It now uses a button click to add new rows but sure you can change it to your needs.
http://geekswithblogs.net/AzamSharp/archive/2008/02/06/119332.aspx[^]

Good luck!


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

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