繁体   English   中英

Devexpress 13.2-在树形列表列中添加浏览按钮

[英]Devexpress 13.2 - add browse button in treelist column

我在数据库中有一个表,其列为:

CategoryId
CategoryName
ParentCategoryId
CategoryPath

仅当CategoryPath是子元素时,它才具有值。 现在,为了填充treeviewlist,我编写了以下代码:

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列,我想添加一个图像,这将打开文件对话框,用户可以从中选择文件名,并将完整路径保存在数据库中。

您能否建议操作方法,以便在有路径的地方将其与图像按钮一起显示在列中以更改路径; 当用户要为尚未指定路径的子元素分配新路径时,图像也应出现。

任何帮助将非常感激。

从devexpress网站找到了解决方案。 网址为: https//www.devexpress.com/Support/Center/Question/Details/Q562627

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM