Home All Groups Group Topic Archive Search About

populating a datagrid from an array

Author
2 Mar 2005 4:34 PM
patliz1
Here is the situation:
I have a datagrid that is being populated from a database, with
anywhere from 1 to 3 columns showing depending on how many serving
sizes are selected. The grid is fixed in column widths. An array is
created to store some information--no problem with this one.

The problem: I want to create another datagrid to be placed directly on
top of this one and formatted the same column widths as the first
datagrid. I want to populate the datagrid with some information from
the array that is associated with the data from the first datagrid. Can
it be done and how? Thanks.

Author
4 Mar 2005 3:04 AM
Ken Cox [Microsoft MVP]
It isn't really clear to me what you need to do, but it sounds like a
hierarchical scenario. If so, you might want to investigate this method of
creating grids within grids:

http://www.denisbauer.com/ASPNETControls/HierarGrid.aspx

If I missed the point, perhaps you can explain more fully?

<patl***@juno.com> wrote in message
Show quoteHide quote
news:1109781267.830935.210480@z14g2000cwz.googlegroups.com...
> Here is the situation:
> I have a datagrid that is being populated from a database, with
> anywhere from 1 to 3 columns showing depending on how many serving
> sizes are selected. The grid is fixed in column widths. An array is
> created to store some information--no problem with this one.
>
> The problem: I want to create another datagrid to be placed directly on
> top of this one and formatted the same column widths as the first
> datagrid. I want to populate the datagrid with some information from
> the array that is associated with the data from the first datagrid. Can
> it be done and how? Thanks.
>