在Datagrid视图中添加Linklabel [英] Adding Linklabel in Datagrid view

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

问题描述

大家好,

我有一个状态为datagrid的视图.状态可以为已处理或未处理.我需要在状态下将组合框或链接标签添加到datagridview!并使用相同的我需要更新记录的状态.我已经成功地使用表格中的比率按钮实现了此功能,但现在我希望在网格本身中完成此操作.那么,我们如何实际在gridview中添加单选按钮,组合框或linklabel之类的控件呢!我有一个数据库,并且使用数据库以表格形式加载了网格.尽管从数据库中加载了内容,但可以将控件(Linklabel或组合框)添加到网格吗?

请帮助我.

Hi All,

I have a datagrid view with status .The status can be either Processed or Unprocessed. I need to add a combobox or link label to datagridview under status! and using the same i need to update the status of the records . I have sucessfully Implemented this using ratio buttons in forms but I want now this to be done inside grid itself . So how do we actually add controls like radiobuttons or combobox or linklabel in gridview !! I have a database and the Grid is loaded in my form using database. Can controls(Linklabel or combobox) be added to grid though the content are loaded from database?

Please help me out in this.

Thanks in Advance.

推荐答案

实际上并没有添加到网格中,但是您可以指定datagridview的一列将包含这些控件.对于这种情况,您可能需要DataGridViewComboBoxColumnDataGridViewLinkColumn.请参见此处 [
Its not actually added on the grid, but you can specify that a column of the datagridview will contain these controls. For this scenario, DataGridViewComboBoxColumn and DataGridViewLinkColumn is what you might need. See here[^] for the detailed explanation.


以下链接将帮助您获得解决方案,

[1]
DataGridView类 [ ^ ]
[2] 以编程方式将新行添加到DataGridView [
Following links would help you to get the solution,

[1] DataGridView Class[^]
[2] Programmatically add new row to DataGridView[^]

Hope it helps :)


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

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