Home All Groups Group Topic Archive Search About

Listbox / Combobox with multiple fields as displaymember

Author
24 Apr 2006 1:14 PM
Sergio Torres
I need to populate a combobox and/or a listbox with several fields as
displaymember. Both controls allow only one field as displaymember.

I need the display member to look like this (the columns should be left
aligned), where each columns represents a field in the underlying datatable:

001     SomeText          987654321
002     SomeText 1       123456789
003     SomeText 100    321456987

I am using Visual Basic .Net 2005

Can anybody help me with this?

--
Sergio Torres C.
(505) 897 2041
___________________
http://www.stcsys.com
___________________

Author
24 Apr 2006 2:07 PM
Kerry Moorman
Sergio,

Both the datagrid control and the listview control are more appropriate for
multicolumn display than the listbox/combobox.

Kerry Moorman


Show quote
"Sergio Torres" wrote:

> I need to populate a combobox and/or a listbox with several fields as
> displaymember. Both controls allow only one field as displaymember.
>
> I need the display member to look like this (the columns should be left
> aligned), where each columns represents a field in the underlying datatable:
>
> 001     SomeText          987654321
> 002     SomeText 1       123456789
> 003     SomeText 100    321456987
>
> I am using Visual Basic .Net 2005
>
> Can anybody help me with this?
>
> --
> Sergio Torres C.
> (505) 897 2041
> ___________________
> http://www.stcsys.com
> ___________________
>
Author
24 Apr 2006 2:55 PM
Sergio Torres
Thank you for your input... I'll try the listview...

--
Sergio Torres C.
(505) 897 2041
___________________
http://www.stcsys.com
___________________



Show quote
"Kerry Moorman" wrote:

> Sergio,
>
> Both the datagrid control and the listview control are more appropriate for
> multicolumn display than the listbox/combobox.
>
> Kerry Moorman
>
>
> "Sergio Torres" wrote:
>
> > I need to populate a combobox and/or a listbox with several fields as
> > displaymember. Both controls allow only one field as displaymember.
> >
> > I need the display member to look like this (the columns should be left
> > aligned), where each columns represents a field in the underlying datatable:
> >
> > 001     SomeText          987654321
> > 002     SomeText 1       123456789
> > 003     SomeText 100    321456987
> >
> > I am using Visual Basic .Net 2005
> >
> > Can anybody help me with this?
> >
> > --
> > Sergio Torres C.
> > (505) 897 2041
> > ___________________
> > http://www.stcsys.com
> > ___________________
> >
Author
24 Apr 2006 3:12 PM
Paul
In the query that populates the listbox you could concatenate the fields and
some separator spaces .

Show quote
"Sergio Torres" wrote:

> I need to populate a combobox and/or a listbox with several fields as
> displaymember. Both controls allow only one field as displaymember.
>
> I need the display member to look like this (the columns should be left
> aligned), where each columns represents a field in the underlying datatable:
>
> 001     SomeText          987654321
> 002     SomeText 1       123456789
> 003     SomeText 100    321456987
>
> I am using Visual Basic .Net 2005
>
> Can anybody help me with this?
>
> --
> Sergio Torres C.
> (505) 897 2041
> ___________________
> http://www.stcsys.com
> ___________________
>
Author
24 Apr 2006 3:36 PM
Sergio Torres
Thank you for your input...

I tried what you say but the comlumns content has variable width and I am
not using ANSI Padding in my database. Even if I activate the padding, the
columns are not aligned, because of the use of true type font...

--
Sergio Torres C.
(505) 897 2041
___________________
http://www.stcsys.com
___________________



Show quote
"Paul" wrote:

> In the query that populates the listbox you could concatenate the fields and
> some separator spaces .
>
> "Sergio Torres" wrote:
>
> > I need to populate a combobox and/or a listbox with several fields as
> > displaymember. Both controls allow only one field as displaymember.
> >
> > I need the display member to look like this (the columns should be left
> > aligned), where each columns represents a field in the underlying datatable:
> >
> > 001     SomeText          987654321
> > 002     SomeText 1       123456789
> > 003     SomeText 100    321456987
> >
> > I am using Visual Basic .Net 2005
> >
> > Can anybody help me with this?
> >
> > --
> > Sergio Torres C.
> > (505) 897 2041
> > ___________________
> > http://www.stcsys.com
> > ___________________
> >
Author
24 Apr 2006 6:34 PM
Paul
Understood.  Moorman's suggestion sounds like your best bet.  Good luck.

Show quote
"Sergio Torres" wrote:

> Thank you for your input...
>
> I tried what you say but the comlumns content has variable width and I am
> not using ANSI Padding in my database. Even if I activate the padding, the
> columns are not aligned, because of the use of true type font...
>
> --
> Sergio Torres C.
> (505) 897 2041
> ___________________
> http://www.stcsys.com
> ___________________
>
>
>
> "Paul" wrote:
>
> > In the query that populates the listbox you could concatenate the fields and
> > some separator spaces .
> >
> > "Sergio Torres" wrote:
> >
> > > I need to populate a combobox and/or a listbox with several fields as
> > > displaymember. Both controls allow only one field as displaymember.
> > >
> > > I need the display member to look like this (the columns should be left
> > > aligned), where each columns represents a field in the underlying datatable:
> > >
> > > 001     SomeText          987654321
> > > 002     SomeText 1       123456789
> > > 003     SomeText 100    321456987
> > >
> > > I am using Visual Basic .Net 2005
> > >
> > > Can anybody help me with this?
> > >
> > > --
> > > Sergio Torres C.
> > > (505) 897 2041
> > > ___________________
> > > http://www.stcsys.com
> > > ___________________
> > >

AddThis Social Bookmark Button