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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid displaying item in two lines

Status
Not open for further replies.

jerasi

Programmer
Jun 19, 2000
141
0
0
CA
Hello,
I'm trying to format a data item so it displays on two lines, I need the id, last name and first name to display on the first line and the details to display on the second line (see xml snippet below).
I don't have much experience with the data grid so any samples would be appreciated. Thank you.

<something>
<scratch>
<id>1</id>
<last_name>Peacock</last_name>
<first_name>Margaret</first_name>
<details>long notes or description goes here</details>
</scratch>
</something>

Let me put it this way:
While StressLevel Is High
Productivity -= 1
Marriage = Nothing
End While
 
Are the data items coming from different database fields (if so you could place them in different <div> tags)?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
This sort of scenario is actually better suited for a DataList where you can assign item templates such that you have groups of data in a single section repeated however many times. E.g. you'd be able to have 3 databound labels separated by line breaks, which can then be put into a layout where you'd have, say 4 columns maximum, with N-number of rows.

 
You can also do a one column grid and use a template column to place the fields in as you want them. You can have as many rows as you want.

Hope this helps,

Jennifer

Hope everyone is having a great day!

Thanks - Jennifer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top