datagrid从列表中填充 [英] datagrid filled from a list

查看:66
本文介绍了datagrid从列表中填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



你知道我在哪里可以找到一个简单的例子来说明我想要实现的价值:

我我的数据库表中有两列填充数据集。

然后数据集用于填充数据网格。

但是我想存储数据列表中的数据集。我的数据集

有1列整数值和1列字符串值,所以我的

列表应该有相同的。

然后数据网格应该使用列表而不是

数据集来填充。

我不知道:

-how创建列表和存储我的数据集的值

-how指定一个列表作为我的数据网格的数据源


你能帮忙吗?

谢谢

Hi,
Do you know where I can find a simple example of what I''m trying to
achieve :
I have a dataset filled with two columns from a table of my database.
Then the dataset is used to fill a datagrid.
But I would like to store the data of the dataset in a list. My dataset
has 1 column of integer values and 1 column of string values, so my
list should have the same.
Then the datagrid should be filled using the list instead of the
dataset.
I don''t know :
-how to create a list and store my dataset''s values
-how to specify a list as the datasource for my datagrid

can you help ?
Thx

推荐答案

Sam,


我一见过面,疯狂的问题,你的是一个在顶部。


但是你可能有理由我不知道,你能解释一下这对我来说是多少吗?因为它让我非常好奇,也许有一个更简单的解决方案。


Cor
Sam,

I have seen on first sight, crazy questions, yours is one on the top.

However probably you have a reason for it that I don''t know, can you explain
that to me, because it makes me very curious and maybe there is a much
simpler solution.

Cor


是的,这听起来很疯狂......

我的问题是我的数据网格中有组合框。当用户

在一个组合框中选择一个值时,下面的行

上的组合框不应再包含该值。所以基本上数据源是

为下面的行更新。在我看来,这是不可能实现的,因为每个数据网格只能有一个数据源(而不是每个b $ b行)。因此,我想从我将相应更新的

列表中动态填充我的组合框....

这可能吗?您之前见过类似的东西吗?

thx

yes it sounds crazy...
My problem is that I have comboboxes in my datagrid. When the user
selects a value in one combobox, then the comboboxes on the rows below
should not contain that value any more. So basically the datasource is
getting updated for the row below. In my opinion this is impossible to
achieve as you can have only one datasource per datagrid (and not per
row). Therefore I''d like to populate my comboboxes dynamically from a
list that I would update accordingly ....
Is this possible ? Have you seen similar stuff before ?
thx


Sam,


我相信你不会在这方面成功。看到这个

1 2

2 3

3 4


你改变第1行2在第3行应该发生什么。

(虽然第2行实际上甚至没有动作,所以没有发生任何事情)。


这将是一个我的意见非常偏执。


Cor
Sam,

I believe that you will not succeed logical in this. See this
1 2
2 3
3 4

You change row 1 the 2 in 3 what should than happen in row 2.
(While row 2 is actually not even in action so there happens nothing).

This will be a very lonly route to go in my opinon.

Cor


这篇关于datagrid从列表中填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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