如何在网格视图或html表中获取新行? [英] How to get a new row in grid view or html table?

查看:94
本文介绍了如何在网格视图或html表中获取新行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想用C#创建一个表。网格视图或html表。

其中一行包含一个回复按钮和一个问题。

当有人想回复时,点击回复按钮,一个新的文本框应该出现并在提交文本时,它应显示在下一行。



与我们在Code Project中的方式相同。

如何实现呢?

请帮忙。



谢谢你,

Hi all,
I want to create a table using C#. Either grid view or html table.
where a row contains a Reply button and a question.
when some one wants to reply, on clicking reply button, a new text box should appear and on submitting the text, it should be displayed in the very next row.

same as the way we do in Code Project .
how to achieve it?
please help.

Thank you,

推荐答案

在gridview的ItemTemplate中创建一个具有多行属性的文本框。

并在具有多行属性的EditItemTemplate中创建相同的内容。

并确保它在gridview的ItemTemplate中不可见。



在该按钮的click事件中找到源代码,使用rowindex获取文本框属性,然后使该文本可见,并编写自己的代码将值存储在数据库中。



我希望它可以帮助你解决问题。
In the ItemTemplate of the gridview create a textbox with multiline property.
and create the same in the EditItemTemplate with multiline property.
And make sure that it''s invisible in ItemTemplate of the gridview.

And coming to sourcecode in the click event of that button get the textbox properties using rowindex and then make that text visible and write your own code to store the values in database.

I hope it helps your problem some how.


这篇关于如何在网格视图或html表中获取新行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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