vb.net datagridview或treeview sql数据绑定 [英] vb.net datagridview or treeview sql databound

查看:252
本文介绍了vb.net datagridview或treeview sql数据绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我对编程还很陌生(现在已经花了一年的时间).我的程序遇到了一些麻烦.我使用了很多datagridviews,但是某些东西并不能解决问题(或者我不知道该怎么做):-)

我向所有高级程序员提出的问题.我有一个名为orders的表(sql 2008数据库),其中包含一些字段,例如:OrderID,Date,OrderedBy,....然后,我还有另一个名为Orderlines的表,其字段为:OrderID,ProductID,数量,金额,成本,LineNR, ...

这两个关系一对多.因此,订单是标题",其中包含一些详细的订单行.现在,我想在某种网格中显示它们,用户可以按订单ID进行扩展,从而扩展订单行.这样的事情可能吗?朝正确方向迈出的任何一步将不胜感激.

顺便说一句:我以前在一个网格中有订单,然后随着选择的改变,我在另一个网格中显示了订单行.

在此先谢谢您(对不起我的英语)!

如果此问题与WPF相关,我将创建一个ListView,该ListView中带有一个名为Orders的扩展器.在Windows窗体中,我真的不知道...


Hi all,

I''m fairly new to programming (been at it for a year now). I''m having some trouble with my program. I use a lot of datagridviews but somethimes it just doesn''t cut it (or i don''t know how to do it) :-)

My question to all you advanced programmers. I have a table called orders (sql 2008 database) with some fields like: OrderID, Date, OrderedBy,... And then i have another table called Orderlines with the fields as: OrderID, ProductID, Quantity, Amount, Cost, LineNR,...

These twoo relate one to many. So orders is the ''headline'' and it has some detailed orderlines. Now i would like to show them in a grid of some sort that users can expand per orderID and so expand the orderlines. Is something like this possible? Any step in the right direction would be grately appreciated.

BTW: i used to have the orders in one grid and then with selection changed i showed the orderlines in another grid.

Thanks in advance (and sorry for my english)!

Greetings

解决方案

IF this problem is WPF related I would create a ListView that had one filed with an expander in it called Orders. In Windows Forms I dont really know...


这篇关于vb.net datagridview或treeview sql数据绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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