Data structuring help needed.

A

arun.hallan

Hi,

I need some structuring help.

I have a set of data, in the form of an arraylist of objects.
Each object is the same, and can be treated as a generic object which
gets and sets properties.

I want to display this in a datagrid - which is not too hard.
I've done this by mapping the object data to a datatable, and then
databinding the datatable to the datagrid.

I also retrieve other data from the database, depending on the data
from the datagrid. The problem is, a few results may come back for one
field. EG two id's come back.

What i want to do is to display these results in a dropdownlist, so the
user can select what result they want.

How could/should i go about doing this?
Thanks
 
G

Guest

Hi hallan,

It’s pretty similar to the way you bind datagrid:

ddlObj.DataSource = datatableObj;

// Mapping
ddlObj.DataValueField = "ValueField_Name";
ddlObj.DataTextField = "TextField_Name";

ddlObj.DataBind();


HTH

Elton Wang
 
A

arun.hallan

Sorry.

I want to put the dropdownlist into a field in the datagrid.
This is where im having problems...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top