Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MultipleObjects in Datagrid

Status
Not open for further replies.

GavW

Programmer
Jan 13, 2006
58
GB
Hey all!

I would like to include 2 separate database fields within the same cell of a datagrid. At the moment i successfully including a single field using the following code:

BoundColumn topics = new BoundColumn();
topics.DataField = "Topics";
topics.DataFormatString = "{0}";
topics.HeaderText = "Topics

This results in a column that looks like:

Heading
Topics

When what i want to acheive is:

Heading
Topics
Field2

Could anybody help me with the code for this problem?

Thanks in advance

GavW
 
You would have to use a template column, and add multiple controls to it, a lable or liter for example, and bind those objects.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top