Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > formatting listbox into columns

Reply
Thread Tools

formatting listbox into columns

 
 
headware
Guest
Posts: n/a
 
      09-06-2003
I'm trying to list data that is really best put into a table, but I
need easy multi-select functionality, so I'm trying to go with a
listbox. I attempted to use the PadRight() function of the string
class to get the data to separate into columns, but the listbox seems
to turn all the extra spaces into one space by the time it gets
rendered. It only does this with spaces though. If I use another
character like '.' it will work correctly but it looks awful. I saw a
post on here that was put up a while ago in which someone had the
exact problem I'm having, but no one gave him a solution that would
work. Does anyone know of a way to do this?

Thanks,
Dave
 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      09-08-2003
why don't u use a textbox. set the rows to multi-select and then set the
colum property to 2. then you can get the text to fall into the two columns.

"headware" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> I'm trying to list data that is really best put into a table, but I
> need easy multi-select functionality, so I'm trying to go with a
> listbox. I attempted to use the PadRight() function of the string
> class to get the data to separate into columns, but the listbox seems
> to turn all the extra spaces into one space by the time it gets
> rendered. It only does this with spaces though. If I use another
> character like '.' it will work correctly but it looks awful. I saw a
> post on here that was put up a while ago in which someone had the
> exact problem I'm having, but no one gave him a solution that would
> work. Does anyone know of a way to do this?
>
> Thanks,
> Dave



 
Reply With Quote
 
 
 
 
headware
Guest
Posts: n/a
 
      09-10-2003
Well, there is no mutli-select functionality for a textbox as far as I
know. There is a multi-line option, but that's different. Also, the
Columns property really is misleadingly named. All that specifies is
how many characters will fit in single row of text in the box. It
should be called LineWidth or something like that.

I really need the mutli-select functionality of the listbox. Someone
suggested that you could use "&nbsp;" instead of spaces in the listbox
text value. However, when I tried to do this it turned the &nbsp; into
"&amp;nbsp;" so it would end up actually displaying "&nbsp;" in the
text of the items. Is there any way to shut that off? There must be
some way to put extra spaces into listbox text items!


"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in message news:<#(E-Mail Removed)>...
> why don't u use a textbox. set the rows to multi-select and then set the
> colum property to 2. then you can get the text to fall into the two columns.
>
> "headware" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) m...
> > I'm trying to list data that is really best put into a table, but I
> > need easy multi-select functionality, so I'm trying to go with a
> > listbox. I attempted to use the PadRight() function of the string
> > class to get the data to separate into columns, but the listbox seems
> > to turn all the extra spaces into one space by the time it gets
> > rendered. It only does this with spaces though. If I use another
> > character like '.' it will work correctly but it looks awful. I saw a
> > post on here that was put up a while ago in which someone had the
> > exact problem I'm having, but no one gave him a solution that would
> > work. Does anyone know of a way to do this?
> >
> > Thanks,
> > Dave

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox item added with client scripts not submitting with ASP:Listbox Simon Prince ASP .Net 2 10-19-2004 04:11 PM
How do I move all items in a listbox to another listbox kent ASP .Net 1 05-03-2004 12:17 AM
click listbox and refresh another listbox DC Gringo ASP .Net 0 04-06-2004 02:13 AM
Binded Datagrid Formatting columns or hiding columns ton ASP .Net Web Controls 2 02-11-2004 04:09 AM
Re: now desparate! - 1st listbox contents disappears when 2nd listbox appears? blenderdude ASP .Net 0 08-03-2003 10:18 PM



Advertisments