如何在网格视图中编辑 Linkcolumn 类型的单元格 [英] How to edit cell of type Linkcolumn in a gridview

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

问题描述

我有一个有 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.

我们如何编辑链接列单元格?当我点击这个单元格时,什么也没有发生.我确实将它的 readonly 属性设置为 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.

推荐答案

您可以尝试创建一个文本框控件,并在编辑网格时显示它,这将允许用户输入超链接的文本.然后添加代码以检查此文本框控件是否有任何文本,如果有,您可以使用文本框的值显示超链接控件并隐藏文本框.

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 类型的单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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