Multiple lines in ListView & DataGrid

Multiple lines in ListView & DataGrid

Page 1 of 1

2 Replies - 4767 Views - Last Post: 03 January 2010 - 04:01 AM Rate Topic: -----

#1 daydr3am3r  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 101
  • Joined: 10-April 09

Multiple lines in ListView & DataGrid

Posted 02 January 2010 - 09:24 AM

Hi
I was wondering if it is possible to add multiple lines on a specific column in a ListView, but not to all the columns.
For example I store names & car numbers in a database. So if one person has more than one car I don't want to display every car as a new record. I just want to display the name in one column and the car numbers in the other, like this:
-------------------------------------------
|   NAME	 |		CAR NUMBER		  |
-------------------------------------------
|Jhon Smith  |ABCDE - 12345			   |
-------------------------------------------
|Joe Doe	 |DOLDG - 16874			   |
-------------------------------------------
|Batman	  |OHIMN - 68755			   |
|			|POIYH - 98749			   |
|			|OHSAL - 96436			   |
-------------------------------------------



Same question goes for DataGrid too.
*Hope I don't get a warn for using the code tag like this.

Is This A Good Question/Topic? 0
  • +

Replies To: Multiple lines in ListView & DataGrid

#2 BrainCode  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 23-August 09

Re: Multiple lines in ListView & DataGrid

Posted 02 January 2010 - 12:00 PM

View Postdaydr3am3r, on 2 Jan, 2010 - 08:24 AM, said:

Hi
I was wondering if it is possible to add multiple lines on a specific column in a ListView, but not to all the columns.
For example I store names & car numbers in a database. So if one person has more than one car I don't want to display every car as a new record. I just want to display the name in one column and the car numbers in the other, like this:
-------------------------------------------
|   NAME	 |		CAR NUMBER		  |
-------------------------------------------
|Jhon Smith  |ABCDE - 12345			   |
-------------------------------------------
|Joe Doe	 |DOLDG - 16874			   |
-------------------------------------------
|Batman	  |OHIMN - 68755			   |
|			|POIYH - 98749			   |
|			|OHSAL - 96436			   |
-------------------------------------------


Same question goes for DataGrid too.
*Hope I don't get a warn for using the code tag like this.


I don't think it's possible because for each record in the ListView you need to add an Item (Name) first before you can add the SubItem (Car#). Besides if you can do it like your depiction above, those extra lines are still records even though the Items (Names) column is empty so why not just repeat the names as well? :D
Was This Post Helpful? 0
  • +
  • -

#3 daydr3am3r  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 101
  • Joined: 10-April 09

Re: Multiple lines in ListView & DataGrid

Posted 03 January 2010 - 04:01 AM

View PostBrainCode, on 2 Jan, 2010 - 11:00 AM, said:

View Postdaydr3am3r, on 2 Jan, 2010 - 08:24 AM, said:

Hi
I was wondering if it is possible to add multiple lines on a specific column in a ListView, but not to all the columns.
For example I store names & car numbers in a database. So if one person has more than one car I don't want to display every car as a new record. I just want to display the name in one column and the car numbers in the other, like this:
-------------------------------------------
|   NAME	 |		CAR NUMBER		  |
-------------------------------------------
|Jhon Smith  |ABCDE - 12345			   |
-------------------------------------------
|Joe Doe	 |DOLDG - 16874			   |
-------------------------------------------
|Batman	  |OHIMN - 68755			   |
|			|POIYH - 98749			   |
|			|OHSAL - 96436			   |
-------------------------------------------


Same question goes for DataGrid too.
*Hope I don't get a warn for using the code tag like this.


I don't think it's possible because for each record in the ListView you need to add an Item (Name) first before you can add the SubItem (Car#). Besides if you can do it like your depiction above, those extra lines are still records even though the Items (Names) column is empty so why not just repeat the names as well? :D

Thanks for your reply. I know those extra lines are still records. I had this idea while working on a little application. I thought it would be easier to add all those SubItems together instead of adding them separately. In fact I added a browse button in my application to read the SubItems from a txt or xls file and I used a report to view the records(though I don't like reports).
Thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1