我想使用什么 .NET 控件?
我应该使用什么 .NET 控件来向用户显示它?
我有两种类型的元素:包和物品。项目包含的数据是 ID、大小和状态。该包可以有多个项目(但没有包,因为它不是一棵树)。它保存状态和计数。我可以为此想到第三栏。我需要右键单击每个项目或包并选择命令。我应该将包裹内的所有物品归为一组。如果用户双击,我想隐藏或显示包中的项目。
我不知道该使用什么控件。我正在考虑带有 id 和 size 列的数据网格,并认为我可以使用 id 作为状态并拥有某种树,但我不知道这是否可能。我应该使用什么控件?
What .NET control do i should i use to display this to the user?
I have 2 types of elements, a package and item. The data an item contains is id, size and status. The package can have several items (but no packages as its not a tree). It holds status and count. I can think of a 3rd column for this. I will need to right click each item or package and select commands. I should have all items within a package in a group. i would like to hide or show the items in a package if the user double clicks.
I dont know what control to use. I was thinking datagrid with a id and size column and thought i can use id as status and have some kind of tree but i dont know if thats possible. What control should i use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用常规树视图...将状态作为主条目级别,将产品的子节点作为标签的一部分,将项目作为子节点...
完全展开时如下所示:
use a regular treeview... with the status as main entry level with child nodes of Product with count as a part of the label and the item(s) as child nodes ...
something like this when fully expanded :
实现这一点的标准方法称为“主从表单”;如果你搜索这个,你会发现很多实现。您可以使用标准 .Net 网格控件来添加、选择、编辑和删除行。
您使用一对 GridView;在您的情况下,包裹的主网格和项目的第二个详细网格。单击一个包将显示所有项目。
The standard way of implementing this is called a Master-Detail form; if you search for this you will find many implementations. You can use the standard .Net grid controls for adding, selecting, editing, and deleting rows.
You use a pair of GridViews; in your case a master grid of packages and a second detail grid of items. Clicking a package will show all the items.