T
TheHach
Hi.
(For information, i'm working in VB.NET)
In our company, we have material that is divided into 3 parts :
- a system
- a batch
- an article
In each system are different batches, and in each batch different
articles.
So, in a webpage, I have to show our material like this :
(+) System 1
(+) Batch 1
Article 1
Article 2
(+) Batch 2
Article 3
Article 4
(+) Batch 3
(+) System 2
.....
So that when the user clicks on the (+) before the system or the batch,
it develops the list of batches or articles.
I tried to do this with nested datalists.
So, I have a main datalist where are listed the systems. In the
SelectedItemTemplate of this datalist, I've a second datalist which
lists the batches of the system. And in the SelectedItemTemplate of this
second datalist, I've the third which lists the articles of the selected
batch.
In our database, the three types of material are in the same table. They
are differentiated thanks to 3 columns : POSITION_C (position of the
system in the list), POSITION_D (position of the batch, or null if it's
only a system) and POSITION_E (position of the article, or null if it's
a system or a batch).
In my first datalist, I list the systems with a dataset which contains
all the material where position_d and position_e are null.
In the second datalist, the datasource is a function (GetDetailsD) where
there is an argument : the position_c of the current system.
The code is the following : DataSource='<%# GetDetailsD(DataBinder.Eval
(Container, "DataItem.POSITION_C")) %>'
In the third datalist, the datasource is another function (GetDetailsE
where the arguments are the position_c and the position_d of the current
batch. The code is : DataSource='<%# GetDetailsE(DataBinder.Eval
(Container, "DataItem.POSITION_C"),DataBinder.Eval(Container,
"DataItem.POSITION_D")) %>'
When I launch my page, the systems are correctly listed. When I click on
a (+) before a system, it shows me the correct batches that compose this
system. But when I click on a (+) before a batch to show the articles,
the line of the batch disappears. The problem comes from the datasource
of my second datalist : when I replace the argument of my function
GetDetailsD (i.e. DataBinder.Eval(Container, "DataItem.POSITION_C")) by
a number (2, or 4, or ...), it works fine. It's only when the argument
is DataBinder.Eval(Container, "DataItem.POSITION_C")....
What am I doing wrong ???
Thanks for help...
(For information, i'm working in VB.NET)
In our company, we have material that is divided into 3 parts :
- a system
- a batch
- an article
In each system are different batches, and in each batch different
articles.
So, in a webpage, I have to show our material like this :
(+) System 1
(+) Batch 1
Article 1
Article 2
(+) Batch 2
Article 3
Article 4
(+) Batch 3
(+) System 2
.....
So that when the user clicks on the (+) before the system or the batch,
it develops the list of batches or articles.
I tried to do this with nested datalists.
So, I have a main datalist where are listed the systems. In the
SelectedItemTemplate of this datalist, I've a second datalist which
lists the batches of the system. And in the SelectedItemTemplate of this
second datalist, I've the third which lists the articles of the selected
batch.
In our database, the three types of material are in the same table. They
are differentiated thanks to 3 columns : POSITION_C (position of the
system in the list), POSITION_D (position of the batch, or null if it's
only a system) and POSITION_E (position of the article, or null if it's
a system or a batch).
In my first datalist, I list the systems with a dataset which contains
all the material where position_d and position_e are null.
In the second datalist, the datasource is a function (GetDetailsD) where
there is an argument : the position_c of the current system.
The code is the following : DataSource='<%# GetDetailsD(DataBinder.Eval
(Container, "DataItem.POSITION_C")) %>'
In the third datalist, the datasource is another function (GetDetailsE
where the arguments are the position_c and the position_d of the current
batch. The code is : DataSource='<%# GetDetailsE(DataBinder.Eval
(Container, "DataItem.POSITION_C"),DataBinder.Eval(Container,
"DataItem.POSITION_D")) %>'
When I launch my page, the systems are correctly listed. When I click on
a (+) before a system, it shows me the correct batches that compose this
system. But when I click on a (+) before a batch to show the articles,
the line of the batch disappears. The problem comes from the datasource
of my second datalist : when I replace the argument of my function
GetDetailsD (i.e. DataBinder.Eval(Container, "DataItem.POSITION_C")) by
a number (2, or 4, or ...), it works fine. It's only when the argument
is DataBinder.Eval(Container, "DataItem.POSITION_C")....
What am I doing wrong ???
Thanks for help...