Re: DataView on two DataTables
- From: "Bart Mermuys" <bmermuys.nospam@xxxxxxxxxxx>
- Date: Mon, 12 Feb 2007 19:42:28 GMT
Hi,
"Garik" <garik_ma@do not spam.yahoo.com> wrote in message
news:B23EFE4A-CED8-4753-90EF-5DF6D7299761@xxxxxxxxxxxxxxxx
Thank you Bart Mermuys,
It is the exact solution I was looking for.
I tried using Expression Columns, but I don't realize when the expression
is
evaluated?
Is the value in the column will be changed, if I modify the row in
the Parent (Customer) table? Is the value in the column will be changed,
if I
modify Foreign Key column in the Child table (OrderHeader)?
It looks like the expression is evaluated when either of the two changes you
mention happen.
If expression is evaluated every time when I query the value in the
column,
the performance will be very slow in my view.
I believe the expression is _not_ evaluated each time you access the value,
if that's what you mean.
HTH,
Greetings
--
Regards,
Garik Melkonyan
MCP, MCAD, MCSD .NET
"Bart Mermuys" wrote:
Hi,
"Garik" <garik_ma@do not spam.yahoo.com> wrote in message
news:4F794C82-B126-49C2-98EC-D07E64F9F742@xxxxxxxxxxxxxxxx
For example I have two tables: Order Header and Customer, and a
relation
OrderHeader.CustKey = Customer.CustKey.
Suppose you want to show OrderHeader fields but also
OrderHeader.Customer.Name, then you could "import" the Customer.Name into
the OrderHeader table (if you have the right relation), eg.:
OrderHeader table:
- Add column:
- Name : "CustomerName"
- Expression : "parent(fk_customer_orderheader).Name"
Once you have that, you should be able to filter and sort using the
BindingSource.
HTH,
Greetings
So, I want to show Orders in the DataGridView, and Filter or Sort that
grid
by 'Customer.CustomerName, Order.OrderDate DESC'.
Thanks.
"Cor Ligthert [MVP]" wrote:
If not, how can I implement this for sorting, filtering?????That is completely dependend from what you want, however as Frans
said, a
dataview is only doing one table, therefore tell what you want, and
what
is
the data in your rows (and what are the relations)
Cor
.
- References:
- Re: DataView on two DataTables
- From: Cor Ligthert [MVP]
- Re: DataView on two DataTables
- From: Bart Mermuys
- Re: DataView on two DataTables
- From: Garik
- Re: DataView on two DataTables
- Prev by Date: Re: Max pool size reached exception when trying to open a new connection
- Next by Date: Referencing a common instance of a Dataset
- Previous by thread: Re: DataView on two DataTables
- Next by thread: Re: business objects vs. datasets
- Index(es):
Relevant Pages
|