By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,761 Members | 1,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,761 IT Pros & Developers. It's quick & easy.

Data structuring help needed.

P: n/a
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

Mar 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

"ar*********@gmail.com" wrote:
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

Mar 13 '06 #2

P: n/a
Sorry.

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

Mar 14 '06 #3

P: n/a
Done it.

Cheers

Mar 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.