如何编辑类型Linkcolumn细胞在GridView [英] How to edit cell of type Linkcolumn in a gridview

查看:203
本文介绍了如何编辑类型Linkcolumn细胞在GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有4列的GridView控件。一列的类型是的linkcolumn 。用户必须为每列输入数据。

I have a gridview control having 4 columns. One of the column is of type linkcolumn. The user has to enter data for each column.

我们如何编辑链接列单元格?当我点击该小区没有任何反应。我没有设置其只读属性设置为false。

How can we edit the link column cell? When I click on this cell nothing happens. I did set its readonly property to false.

推荐答案

您可以尝试创建一个文本框控件,而不是并显示当电网正在被编辑,这将允许用户输入超链接的文本。然后添加代码来检查,如果这个文本框控件有任何文本,如果是这样你就可以显示与文本框中的值hypelink控制和隐藏文本框。

Your can try creating a textbox control instead and show it when the grid is being edited, this will allow the user to enter the hyperlink's text. Then add code to check if this textbox control has any text and if so you can then display a hypelink control with the value from the textbox and hide the textbox.

此外,我的优选这样做的方式是使用网格仅供查看(只读),然后与用于数据输入的目的数据输入字段一个单独的表格

Also, my preferred way of doing this is to use grids for viewing only (read only), and then have a separate form with the data entry fields for data entry purposes.

好万事如意!

这篇关于如何编辑类型Linkcolumn细胞在GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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