Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Devexpress 13.2-在树状列表列中添加浏览按钮_C#_Winforms_Devexpress_Devexpress Windows Ui - Fatal编程技术网

C# Devexpress 13.2-在树状列表列中添加浏览按钮

C# Devexpress 13.2-在树状列表列中添加浏览按钮,c#,winforms,devexpress,devexpress-windows-ui,C#,Winforms,Devexpress,Devexpress Windows Ui,我在数据库中有一个表,列如下: CategoryId CategoryName ParentCategoryId CategoryPath CategoryPath仅当它是子元素时才具有这些值。现在,为了填充TreeView列表,我编写了以下代码: DataTable dt = d.CategoryGet(new System.Collections.Hashtable()); treeList1.DataSource = dt; treeList1.KeyFieldName = info.C

我在数据库中有一个表,列如下:

CategoryId
CategoryName
ParentCategoryId
CategoryPath
CategoryPath仅当它是子元素时才具有这些值。现在,为了填充TreeView列表,我编写了以下代码:

DataTable dt = d.CategoryGet(new System.Collections.Hashtable());
treeList1.DataSource = dt;
treeList1.KeyFieldName = info.CategoryParameters.CategoryId.ToString();
treeList1.ParentFieldName = info.CategoryParameters.ParentCategoryId.ToString();

treeList1.PopulateColumns();
treeList1.BestFitColumns();
treeList1.ExpandAll();

treeList1.FocusedNode = treeList1.Nodes[0];
对于CategoryPath列,我想添加一个图像,它将打开文件对话框,用户可以从中选择文件名,完整路径将保存在数据库中

请您建议如何操作,以便在有路径的地方,它应与图像按钮一起显示在列中,以更改路径;当用户希望为尚未指定路径的子元素分配新路径时,也应显示该图像


任何帮助都将不胜感激。

如何使用ButtonEdit进行此操作

这里有一个例子

从devexpress站点找到了解决方案。网址是:

感谢potehin143关注我的问题。我不认为这将是有用的,因为我想要一个简单的图像,点击打开一个对话框,并从中选择显示在CellPoteHi143中的文本-你是对的。我终于在这里使用了ButtonEdit。我首先推荐ButtonEdit,因为它比任何自定义实现都更稳定。如果您需要制作良好的UI,请尝试WPF。Sash不是问题所在,只是好奇而已,为什么不试试devexpress支持呢。他们非常乐于助人,反应迅速。我们从他们的网站上找到了解决方案。